This repository has been archived by the owner on Nov 7, 2020. It is now read-only.
forked from Praqma/helmsman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
decision_maker_test.go
76 lines (74 loc) · 1.57 KB
/
decision_maker_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package main
import "testing"
func Test_getValuesFiles(t *testing.T) {
type args struct {
r *release
}
tests := []struct {
name string
args args
want string
}{
{
name: "test case 1",
args: args{
r: &release{
Name: "release1",
Description: "",
Namespace: "namespace",
Enabled: true,
Chart: "repo/chartX",
Version: "1.0",
ValuesFile: "test_files/values.yaml",
Purge: true,
Test: true,
},
//s: st,
},
want: " -f test_files/values.yaml",
},
{
name: "test case 2",
args: args{
r: &release{
Name: "release1",
Description: "",
Namespace: "namespace",
Enabled: true,
Chart: "repo/chartX",
Version: "1.0",
ValuesFiles: []string{"test_files/values.yaml"},
Purge: true,
Test: true,
},
//s: st,
},
want: " -f test_files/values.yaml",
},
{
name: "test case 1",
args: args{
r: &release{
Name: "release1",
Description: "",
Namespace: "namespace",
Enabled: true,
Chart: "repo/chartX",
Version: "1.0",
ValuesFiles: []string{"test_files/values.yaml", "test_files/values2.yaml"},
Purge: true,
Test: true,
},
//s: st,
},
want: " -f test_files/values.yaml -f test_files/values2.yaml",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := getValuesFiles(tt.args.r); got != tt.want {
t.Errorf("getValuesFiles() = %v, want %v", got, tt.want)
}
})
}
}