Migrate ingress.class annotation to new IngressClassName field
This commit is contained in:
parent
461aa93d13
commit
04ef782c57
7 changed files with 46 additions and 27 deletions
|
|
@ -190,7 +190,8 @@ func TestCheckIngress(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run("When the ingress class differs from nginx", func(t *testing.T) {
|
||||
ing.ObjectMeta.Annotations["kubernetes.io/ingress.class"] = "different"
|
||||
class := "different"
|
||||
ing.Spec.IngressClassName = &class
|
||||
nginx.command = testNginxTestCommand{
|
||||
t: t,
|
||||
err: fmt.Errorf("test error"),
|
||||
|
|
@ -201,7 +202,8 @@ func TestCheckIngress(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("when the class is the nginx one", func(t *testing.T) {
|
||||
ing.ObjectMeta.Annotations["kubernetes.io/ingress.class"] = "nginx"
|
||||
class := "nginx"
|
||||
ing.Spec.IngressClassName = &class
|
||||
nginx.command = testNginxTestCommand{
|
||||
t: t,
|
||||
err: nil,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue