Skip to content

Commit

Permalink
Merge pull request #196 from zong-zhe/fix-test-case
Browse files Browse the repository at this point in the history
fix: bump the latest version of k8s in test case
  • Loading branch information
Peefy authored Oct 8, 2023
2 parents 900a16d + 8b3a380 commit 3c86657
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 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.Sum, "xnYM1FWHAy3m+KcQMQb2rjZouTxumqYt6FGZpu2T4yM=")
assert.Equal(t, dep.FullName, "k8s_1.28")
assert.Equal(t, dep.Version, "1.28")
assert.Equal(t, dep.Sum, "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q=")
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 3c86657

Please sign in to comment.