Skip to content

Commit

Permalink
fix: bump the latest version of k8s in test case
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Oct 8, 2023
1 parent 900a16d commit f9eaf82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ func TestDownloadLatestOci(t *testing.T) {
dep, err := kpmcli.Download(&depFromOci, testPath)
assert.Equal(t, err, nil)
assert.Equal(t, dep.Name, "k8s")
assert.Equal(t, dep.FullName, "k8s_1.27")
assert.Equal(t, dep.Version, "1.27")
assert.Equal(t, dep.FullName, "k8s_1.28")
assert.Equal(t, dep.Version, "1.28")
assert.Equal(t, dep.Sum, "xnYM1FWHAy3m+KcQMQb2rjZouTxumqYt6FGZpu2T4yM=")
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.27")
assert.Equal(t, dep.LocalFullPath, testPath+"1.27")
assert.Equal(t, dep.Source.Oci.Tag, "1.28")
assert.Equal(t, dep.LocalFullPath, testPath+"1.28")
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.27.tar")), false)
assert.Equal(t, utils.DirExists(filepath.Join(testPath, "k8s_1.28.tar")), false)

err = os.RemoveAll(getTestDir("download"))
assert.Equal(t, err, nil)
Expand Down

0 comments on commit f9eaf82

Please sign in to comment.