Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
This commit is contained in:
Charlie Chiang
2022-07-25 00:28:02 +08:00
parent 78104068b1
commit 0442f823c8
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -1173,13 +1173,13 @@ func TestCheckEnableAddonErrorWhenMissMatch(t *testing.T) {
func TestPackageAddon(t *testing.T) {
pwd, _ := os.Getwd()
validAddonDict := "./testdata/example"
validAddonDict := "./testdata/example-legacy"
archiver, err := PackageAddon(validAddonDict)
assert.NoError(t, err)
assert.Equal(t, filepath.Join(pwd, "example-1.0.1.tgz"), archiver)
assert.Equal(t, filepath.Join(pwd, "example-legacy-1.0.1.tgz"), archiver)
// Remove generated package after tests
defer func() {
_ = os.RemoveAll(filepath.Join(pwd, "example-1.0.1.tgz"))
_ = os.RemoveAll(filepath.Join(pwd, "example-legacy-1.0.1.tgz"))
}()
invalidAddonDict := "./testdata"
+1 -1
View File
@@ -7,6 +7,6 @@ keywords:
- extended_workload
- gitops
- only_example
name: example
name: example-legacy
type: library
version: 1.0.1