-
Notifications
You must be signed in to change notification settings - Fork 8
/
main_test.go
74 lines (71 loc) · 1.61 KB
/
main_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
package main
import (
"reflect"
"testing"
)
func TestNewConfig(t *testing.T) {
tests := []struct {
name string
want *Config
}{
{
name: "test-new-config",
want: &Config{
AdditionalStackTags: make(map[string]string),
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := NewConfig(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("NewConfig() = %v, want %v", got, tt.want)
}
})
}
}
func TestConfig_ParseFlags(t *testing.T) {
type fields struct {
Master string
KubeConfig string
DryRun bool
LogFormat string
LogLevel string
Provider string
NatCidrBlocks []string
AvailabilityZones []string
}
type args struct {
args []string
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
name: "test-no-args-config",
fields: fields{}, // TODO
args: args{}, // TODO
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// TODO
// cfg := &Config{
// Master: tt.fields.Master,
// KubeConfig: tt.fields.KubeConfig,
// DryRun: tt.fields.DryRun,
// LogFormat: tt.fields.LogFormat,
// LogLevel: tt.fields.LogLevel,
// Provider: tt.fields.Provider,
// NatCidrBlocks: tt.fields.NatCidrBlocks,
// AvailabilityZones: tt.fields.AvailabilityZones,
// }
// if err := cfg.ParseFlags(tt.args.args); (err != nil) != tt.wantErr {
// t.Errorf("Config.ParseFlags() error = %v, wantErr %v", err, tt.wantErr)
// }
})
}
}