Skip to content

Commit 6a740a6

Browse files
committed
Add notation to TestGetCacheInfoFromConfigmap(t *testing.T) in pkg\ddc\juicefs\datasetinfo_parser_test.go.
Signed-off-by: 1501634824 <1501634824@qq.com>
1 parent 8a89517 commit 6a740a6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkg/ddc/juicefs/datasetinfo_parser_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ import (
2828
"github.com/fluid-cloudnative/fluid/pkg/utils/fake"
2929
)
3030

31+
// TestGetCacheInfoFromConfigmap 测试从 ConfigMap 中获取缓存信息的功能。
32+
// 1. 创建一个模拟的 ConfigMap 和 Dataset 对象。
33+
// 2. 使用这些对象初始化一个假的客户端。
34+
// 3. 调用 GetCacheInfoFromConfigmap 函数并检查返回的缓存信息是否与预期值匹配。
35+
// 4. 如果返回的缓存信息与预期值不匹配,则报告错误。
36+
//
37+
// 参数:
38+
// t - *testing.T 测试框架提供的测试对象,用于管理测试状态和报告错误。
39+
//
40+
// 返回值:
41+
// 无返回值,但如果测试失败,会调用 t.Errorf 报告错误。
3142
func TestGetCacheInfoFromConfigmap(t *testing.T) {
3243
configMap := &v1.ConfigMap{
3344
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)