Skip to content

Commit f6cf8ae

Browse files
committed
Add comments/notation to TestCompatibleUFSVersion(t *testing.T) in pkg\ddc\alluxio\hcfs_test.go
Signed-off-by: hadoop <3229588753@qq.com>
1 parent 59b3713 commit f6cf8ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/ddc/alluxio/hcfs_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ func TestQueryHCFSEndpoint(t *testing.T) {
199199
}
200200
}
201201
}
202-
202+
// TestCompatibleUFSVersion 测试 Alluxio 引擎查询兼容的底层文件系统(UFS)版本的功能。
203+
// 该测试通过模拟 kubeclient.ExecCommandInContainerWithFullOutput 的行为,验证在不同执行结果下,
204+
// queryCompatibleUFSVersion 方法是否能够正确返回预期的输出。
205+
// 测试分为两个场景:
206+
// 1. 模拟成功执行,返回预期的 "conf" 结果。
207+
// 2. 模拟执行失败,返回错误信息 "err"。
208+
// 每个场景结束后,都会通过 wrappedUnhook 函数清理钩子(hook),以避免对后续测试产生影响。
203209
func TestCompatibleUFSVersion(t *testing.T) {
204210
mockExecCommon := func(ctx context.Context, podName string, containerName string, namespace string, cmd []string) (stdout string, stderr string, e error) {
205211
return "conf", "", nil

0 commit comments

Comments
 (0)