From 7b8261f0dc561599c0cf3d2acf570fc14f198552 Mon Sep 17 00:00:00 2001 From: zongz Date: Thu, 21 Dec 2023 17:10:43 +0800 Subject: [PATCH] fix: fix ci Signed-off-by: zongz --- pkg/client/client_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index cefd1385..4ad14af1 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -83,12 +83,12 @@ func TestDownloadLatestOci(t *testing.T) { err := os.MkdirAll(testPath, 0755) assert.Equal(t, err, nil) depFromOci := pkg.Dependency{ - Name: "k8s", + Name: "helloworld", Version: "", Source: pkg.Source{ Oci: &pkg.Oci{ Reg: "ghcr.io", - Repo: "kcl-lang/k8s", + Repo: "kcl-lang/helloworld", Tag: "", }, }, @@ -97,19 +97,19 @@ func TestDownloadLatestOci(t *testing.T) { assert.Equal(t, err, nil) dep, err := kpmcli.Download(&depFromOci, testPath) assert.Equal(t, err, nil) - assert.Equal(t, dep.Name, "k8s") - assert.Equal(t, dep.FullName, "k8s_1.28") - assert.Equal(t, dep.Version, "1.28") - assert.Equal(t, dep.Sum, "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q=") + assert.Equal(t, dep.Name, "helloworld") + assert.Equal(t, dep.FullName, "helloworld_0.1.1") + assert.Equal(t, dep.Version, "0.1.1") + assert.Equal(t, dep.Sum, "7OO4YK2QuRWPq9C7KTzcWcti5yUnueCjptT3OXiPVeQ=") assert.NotEqual(t, dep.Source.Oci, nil) assert.Equal(t, dep.Source.Oci.Reg, "ghcr.io") - assert.Equal(t, dep.Source.Oci.Repo, "kcl-lang/k8s") - assert.Equal(t, dep.Source.Oci.Tag, "1.28") - assert.Equal(t, dep.LocalFullPath, testPath+"1.28") + assert.Equal(t, dep.Source.Oci.Repo, "kcl-lang/helloworld") + assert.Equal(t, dep.Source.Oci.Tag, "0.1.1") + assert.Equal(t, dep.LocalFullPath, testPath+"0.1.1") assert.Equal(t, err, nil) // Check whether the tar downloaded by `kpm add` has been deleted. - assert.Equal(t, utils.DirExists(filepath.Join(testPath, "k8s_1.28.tar")), false) + assert.Equal(t, utils.DirExists(filepath.Join(testPath, "helloworld_0.1.1.tar")), false) err = os.RemoveAll(getTestDir("download")) assert.Equal(t, err, nil)