Skip to content

Commit f338874

Browse files
committed
fixup: comment remaining test failures
Signed-off-by: Janelle Law <[email protected]>
1 parent c65f599 commit f338874

File tree

2 files changed

+26
-30
lines changed

2 files changed

+26
-30
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Error: unable to read input resources: failed to parse object-templates-raw: yaml: unknown anchor 'odd' referenced
2-
1+
Error:
2+
unable to read input resources:
3+
failed to parse object-templates-raw: error converting YAML to JSON: yaml: unknown anchor 'odd' referenced

test/e2e/case46_dryrun_cli_test.go

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,13 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
6868
"object_cluster_scoped": "Test Object: available for cluster-scoped objects",
6969
// "object_namespaced": "Test Object: available for namespaced objects",
7070
// FIXME executing "tmpl" at <"inventory.yaml">: invalid value; expected string. not all maps in cluster have .data
71-
"object_pod": "Test Object: available for complex objects",
72-
// "object_pod_default_func": "Test Object: nil but succeeds with default function",
73-
// FIXME default pod created successfully in fake cluster, but missing message: pods [nginx-pod] not found in namespace dangler;
74-
"object_pod_nsselector": "Test Object: nil for objects that don't exist",
75-
"object_templated_ns": "Test Object: nil when namespace is templated",
76-
"object_unnamed_objdef": "Test Object: unavailable for unnamed objects",
71+
"object_pod": "Test Object: available for complex objects",
72+
"object_pod_default_func": "Test Object: nil but succeeds with default function",
73+
"object_pod_nsselector": "Test Object: nil for objects that don't exist",
74+
"object_templated_ns": "Test Object: nil when namespace is templated",
75+
"object_unnamed_objdef": "Test Object: unavailable for unnamed objects",
7776
// "objectname_nsselector": "Test ObjectName: correctly handle namespaceSelector",
78-
// FIXME config maps created in fake cluster, but got: No objects of kind ConfigMap were matched from the policy objectSelector
77+
// FIXME want: @@ -1,7 +1,8 @@\n apiVersion: v1\n-data: {}\n+data:\n+ hocus: pocus\n -> got: @@ -1,6 +1,8 @@\n apiVersion: v1\n+data:\n+ hocus: pocus\n
7978
"objectns_cluster_scoped": "Test ObjectNamespace: unavailable for cluster-scoped objects",
8079
"objectns_templated_empty": "Test ObjectNamespace: noncompliant for empty templated namespace",
8180
"objectns_templated_no_nsselector": "Test ObjectNamespace: available for templated namespace",
@@ -84,7 +83,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
8483
It("Should handle context variables", func() {
8584
for testDir, testName := range testContextVariables {
8685

87-
By("Testing context variables" + testName)
86+
By("Testing context variables " + testName)
8887
testDryrunScenario("context_vars", testDir, testName)
8988
}
9089
})
@@ -102,7 +101,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
102101

103102
It("Should handle diffs", func() {
104103
for testDir, testName := range testDiff {
105-
By("Testing diff" + testName)
104+
By("Testing diff " + testName)
106105
testDryrunScenario("diff", testDir, testName)
107106
}
108107
})
@@ -116,7 +115,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
116115

117116
It("Should handle pod annotations", func() {
118117
for testDir, testName := range testKindField {
119-
By("Testing pod annotations" + testName)
118+
By("Testing pod annotations " + testName)
120119
testDryrunScenario("kind_field", testDir, testName)
121120
}
122121
})
@@ -125,33 +124,29 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
125124
Describe("Missing Field Tests", func() {
126125
testMissing := map[string]string{
127126
"missing_kind_name": "Test Missing kind and name",
128-
// "missing_name": "Test Missing name",
129-
// FIXME want: pods not found in namespaces: n1, n2, n3, got: namespaced object case5-multi-namespace-inform-pod of kind Pod has no namespace specified from the policy namespaceSelector nor the object metadata
130-
"missing_kind": "Test Missing kind",
127+
"missing_name": "Test Missing name",
128+
"missing_kind": "Test Missing kind",
131129
}
132130

133131
It("Should handle missing fields", func() {
134132
for testDir, testName := range testMissing {
135-
By("Testing missing fields" + testName)
133+
By("Testing missing fields " + testName)
136134
testDryrunScenario("missing", testDir, testName)
137135
}
138136
})
139137
})
140138

141139
Describe("Multiple Object Tests", func() {
142140
testMultiple := map[string]string{
143-
"multiple_mustnothave": "Test multiple object combo",
144-
"multiple_obj_combo": "Test multiple object combo",
145-
// "multiple_namespace_inform": "Test multiple namespace inform",
146-
// FIXME want: pods [case5-multi-namespace-inform-pod] not found in namespaces: n1, n2, n3\n, got: namespaced object case5-multi-namespace-inform-pod of kind Pod has no namespace specified from the policy namespaceSelector nor the object metadata
147-
// "multiple_namespace_enforce": "Test multiple namespace enforce",
148-
// FIXME want: found as specified, got: namespaced object has no ns specified from policy ns sel nor metadata
149-
// "multiple_obj_template": "Test multiple object template",
150-
// FIXME (same as above) want: found as specified, got: namespaced object has no ns specified from policy ns sel nor metadata
141+
"multiple_mustnothave": "Test multiple object combo",
142+
"multiple_obj_combo": "Test multiple object combo",
143+
"multiple_namespace_inform": "Test multiple namespace inform",
144+
"multiple_namespace_enforce": "Test multiple namespace enforce",
145+
"multiple_obj_template": "Test multiple object template",
151146
}
152147
It("Should handle multiple objects", func() {
153148
for testDir, testName := range testMultiple {
154-
By("Testing multiple objects" + testName)
149+
By("Testing multiple objects " + testName)
155150
testDryrunScenario("multiple", testDir, testName)
156151
}
157152
})
@@ -168,7 +163,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
168163

169164
It("Should handle no name objects", func() {
170165
for testDir, testName := range testNoName {
171-
By("Testing no name objects" + testName)
166+
By("Testing no name objects " + testName)
172167
testDryrunScenario("no_name", testDir, testName)
173168
}
174169
})
@@ -181,7 +176,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
181176
}
182177
It("Should handle cluster-scoped no name", func() {
183178
for testDir, testName := range testNoNameCluster {
184-
By("Testing cluster-scoped no name" + testName)
179+
By("Testing cluster-scoped no name " + testName)
185180
testDryrunScenario("no_name_clusterscope", testDir, testName)
186181
}
187182
})
@@ -196,7 +191,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
196191

197192
It("Should handle no namespace", func() {
198193
for testDir, testName := range testNoNs {
199-
By("Testing no namespace" + testName)
194+
By("Testing no namespace " + testName)
200195
testDryrunScenario("no_ns", testDir, testName)
201196
}
202197
})
@@ -216,7 +211,7 @@ var _ = Describe("Testing dryrun CLI", Ordered, func() {
216211

217212
It("Should handle object template raw", func() {
218213
for testDir, testName := range testObjTmplRaw {
219-
By("Testing object template raw" + testName)
214+
By("Testing object template raw " + testName)
220215
testDryrunScenario("obj_tmpl_raw", testDir, testName)
221216
}
222217
})
@@ -229,7 +224,7 @@ func testDryrunScenario(testCategory, testDir, testName string) {
229224

230225
inputFiles := findInputFiles(testPath)
231226
for _, inputFile := range inputFiles {
232-
By("Applying input file" + inputFile)
227+
By("Applying input file " + inputFile)
233228

234229
utils.Kubectl("apply", "-f", inputFile)
235230
}

0 commit comments

Comments
 (0)