forked from inlets/inlets-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image_test.go
47 lines (38 loc) · 973 Bytes
/
image_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
package main
import "testing"
func Test_GetInletsClientImage_DefaultOSSNoOverride(t *testing.T) {
c := InfraConfig{}
got := c.GetInletsClientImage()
want := "inlets/inlets:2.7.2"
if got != want {
t.Errorf("for OSS variant want %s, but got %s", want, got)
t.Fail()
}
}
func Test_GetInletsClientImage_DefaultProNoOverride(t *testing.T) {
c := InfraConfig{
ProConfig: InletsProConfig{
License: "non-empty",
},
}
got := c.GetInletsClientImage()
want := "inlets/inlets-pro:0.6.0"
if got != want {
t.Errorf("for OSS variant want %s, but got %s", want, got)
t.Fail()
}
}
func Test_GetInletsClientImage_DefaultProWithOverride(t *testing.T) {
c := InfraConfig{
ProConfig: InletsProConfig{
License: "non-empty",
ClientImage: "inlets/inlets-pro:0.6.0-armhf",
},
}
got := c.GetInletsClientImage()
want := "inlets/inlets-pro:0.6.0-armhf"
if got != want {
t.Errorf("for OSS variant want %s, but got %s", want, got)
t.Fail()
}
}