...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package v1alpha1
19
20
21 import (
22 . "github.com/onsi/gomega"
23 "testing"
24 )
25
26 func TestChaosKindMapShouldContainsAWSChaos(t *testing.T) {
27 g := NewGomegaWithT(t)
28 var requiredType TemplateType
29 requiredType = TypeAWSChaos
30
31 _, ok := all.kinds[string(requiredType)]
32 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
33 }
34 func TestChaosKindMapShouldContainsAzureChaos(t *testing.T) {
35 g := NewGomegaWithT(t)
36 var requiredType TemplateType
37 requiredType = TypeAzureChaos
38
39 _, ok := all.kinds[string(requiredType)]
40 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
41 }
42 func TestChaosKindMapShouldContainsBlockChaos(t *testing.T) {
43 g := NewGomegaWithT(t)
44 var requiredType TemplateType
45 requiredType = TypeBlockChaos
46
47 _, ok := all.kinds[string(requiredType)]
48 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
49 }
50 func TestChaosKindMapShouldContainsDNSChaos(t *testing.T) {
51 g := NewGomegaWithT(t)
52 var requiredType TemplateType
53 requiredType = TypeDNSChaos
54
55 _, ok := all.kinds[string(requiredType)]
56 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
57 }
58 func TestChaosKindMapShouldContainsGCPChaos(t *testing.T) {
59 g := NewGomegaWithT(t)
60 var requiredType TemplateType
61 requiredType = TypeGCPChaos
62
63 _, ok := all.kinds[string(requiredType)]
64 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
65 }
66 func TestChaosKindMapShouldContainsHTTPChaos(t *testing.T) {
67 g := NewGomegaWithT(t)
68 var requiredType TemplateType
69 requiredType = TypeHTTPChaos
70
71 _, ok := all.kinds[string(requiredType)]
72 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
73 }
74 func TestChaosKindMapShouldContainsIOChaos(t *testing.T) {
75 g := NewGomegaWithT(t)
76 var requiredType TemplateType
77 requiredType = TypeIOChaos
78
79 _, ok := all.kinds[string(requiredType)]
80 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
81 }
82 func TestChaosKindMapShouldContainsJVMChaos(t *testing.T) {
83 g := NewGomegaWithT(t)
84 var requiredType TemplateType
85 requiredType = TypeJVMChaos
86
87 _, ok := all.kinds[string(requiredType)]
88 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
89 }
90 func TestChaosKindMapShouldContainsKernelChaos(t *testing.T) {
91 g := NewGomegaWithT(t)
92 var requiredType TemplateType
93 requiredType = TypeKernelChaos
94
95 _, ok := all.kinds[string(requiredType)]
96 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
97 }
98 func TestChaosKindMapShouldContainsNetworkChaos(t *testing.T) {
99 g := NewGomegaWithT(t)
100 var requiredType TemplateType
101 requiredType = TypeNetworkChaos
102
103 _, ok := all.kinds[string(requiredType)]
104 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
105 }
106 func TestChaosKindMapShouldContainsPhysicalMachineChaos(t *testing.T) {
107 g := NewGomegaWithT(t)
108 var requiredType TemplateType
109 requiredType = TypePhysicalMachineChaos
110
111 _, ok := all.kinds[string(requiredType)]
112 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
113 }
114 func TestChaosKindMapShouldContainsPodChaos(t *testing.T) {
115 g := NewGomegaWithT(t)
116 var requiredType TemplateType
117 requiredType = TypePodChaos
118
119 _, ok := all.kinds[string(requiredType)]
120 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
121 }
122 func TestChaosKindMapShouldContainsStressChaos(t *testing.T) {
123 g := NewGomegaWithT(t)
124 var requiredType TemplateType
125 requiredType = TypeStressChaos
126
127 _, ok := all.kinds[string(requiredType)]
128 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
129 }
130 func TestChaosKindMapShouldContainsTimeChaos(t *testing.T) {
131 g := NewGomegaWithT(t)
132 var requiredType TemplateType
133 requiredType = TypeTimeChaos
134
135 _, ok := all.kinds[string(requiredType)]
136 g.Expect(ok).To(Equal(true), "all kinds map should contains this type", requiredType)
137 }
138
139