@@ -24,7 +24,7 @@ func MockValidator(name string, called *int, succeed bool) ValidatorContext {
2424 }
2525}
2626
27- var _ = Describe ("Main" , func () {
27+ var _ = Describe ("Main Setup " , func () {
2828 Describe ("Generic Validator" , func () {
2929 var mockFlags * flag.FlagSet
3030 BeforeEach (func () {
@@ -263,25 +263,4 @@ var _ = Describe("Main", func() {
263263 }) // should fail with invalid name
264264 }) // gatewayclass validation
265265 }) // CLI argument validation
266-
267- Describe ("environment variable validaton" , func () {
268- type testCase struct {
269- expSubMsg string
270- podIP string
271- expErr bool
272- }
273- DescribeTable ("should validate the POD_IP env var" ,
274- func (tc testCase ) {
275- err := ValidatePodIP (tc .podIP )
276- if ! tc .expErr {
277- Expect (err ).ToNot (HaveOccurred ())
278- } else {
279- Expect (err .Error ()).To (ContainSubstring (tc .expSubMsg ))
280- }
281- },
282- Entry ("var not set" , testCase {podIP : "" , expErr : true , expSubMsg : "must be set" }),
283- Entry ("var set to invalid value" , testCase {podIP : "invalid" , expErr : true , expSubMsg : "must be a valid" }),
284- Entry ("var set to valid value" , testCase {podIP : "1.2.3.4" , expErr : false }),
285- )
286- }) // environment variable validation
287266}) // end Main
0 commit comments