@@ -683,10 +683,17 @@ var _ = Describe("ScalityUI Shell Features", func() {
683
683
}, eventuallyTimeout , eventuallyInterval ).Should (Succeed ())
684
684
685
685
By ("Verifying the Ingress has basic configuration" )
686
- Expect (ingress .Spec .Rules ).To (HaveLen (1 ))
686
+ Expect (ingress .Spec .Rules ).To (HaveLen (2 ))
687
+
688
+ // Check /shell path (first rule)
687
689
Expect (ingress .Spec .Rules [0 ].HTTP .Paths ).To (HaveLen (1 ))
688
690
Expect (ingress .Spec .Rules [0 ].HTTP .Paths [0 ].Path ).To (Equal ("/shell" ))
689
691
Expect (ingress .Spec .Rules [0 ].HTTP .Paths [0 ].Backend .Service .Name ).To (Equal (resourceName + "-service" ))
692
+
693
+ // Check / path (second rule)
694
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths ).To (HaveLen (1 ))
695
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths [0 ].Path ).To (Equal ("/" ))
696
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths [0 ].Backend .Service .Name ).To (Equal (resourceName + "-service" ))
690
697
})
691
698
692
699
It ("should create a custom Ingress when network configuration is provided" , func () {
@@ -726,8 +733,9 @@ var _ = Describe("ScalityUI Shell Features", func() {
726
733
By ("Verifying the Ingress has the specified host and class" )
727
734
Expect (ingress .Spec .IngressClassName ).NotTo (BeNil ())
728
735
Expect (* ingress .Spec .IngressClassName ).To (Equal ("nginx" ))
729
- Expect (ingress .Spec .Rules ).To (HaveLen (1 ))
736
+ Expect (ingress .Spec .Rules ).To (HaveLen (2 ))
730
737
Expect (ingress .Spec .Rules [0 ].Host ).To (Equal ("test.example.com" ))
738
+ Expect (ingress .Spec .Rules [1 ].Host ).To (Equal ("test.example.com" ))
731
739
732
740
By ("Verifying the Ingress has the specified annotations" )
733
741
Expect (ingress .Annotations ).To (HaveKey ("nginx.ingress.kubernetes.io/ssl-redirect" ))
@@ -762,9 +770,19 @@ var _ = Describe("ScalityUI Shell Features", func() {
762
770
}, eventuallyTimeout , eventuallyInterval ).Should (Succeed ())
763
771
764
772
By ("Verifying the path configuration allows access to the application" )
773
+ Expect (ingress .Spec .Rules ).To (HaveLen (2 ))
774
+
775
+ // Check /shell path (first rule)
776
+ Expect (ingress .Spec .Rules [0 ].HTTP .Paths ).To (HaveLen (1 ))
765
777
Expect (ingress .Spec .Rules [0 ].HTTP .Paths [0 ].Path ).To (Equal ("/shell" ))
766
778
Expect (ingress .Spec .Rules [0 ].HTTP .Paths [0 ].PathType ).NotTo (BeNil ())
767
779
Expect (* ingress .Spec .Rules [0 ].HTTP .Paths [0 ].PathType ).To (Equal (networkingv1 .PathTypePrefix ))
780
+
781
+ // Check / path (second rule)
782
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths ).To (HaveLen (1 ))
783
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths [0 ].Path ).To (Equal ("/" ))
784
+ Expect (ingress .Spec .Rules [1 ].HTTP .Paths [0 ].PathType ).NotTo (BeNil ())
785
+ Expect (* ingress .Spec .Rules [1 ].HTTP .Paths [0 ].PathType ).To (Equal (networkingv1 .PathTypePrefix ))
768
786
})
769
787
})
770
788
})
0 commit comments