@@ -27,9 +27,9 @@ import (
2727 "k8s.io/ingress-nginx/internal/ingress/resolver"
2828)
2929
30- const DefaultHttpErrorsString = "400,404,500,502"
30+ const DefaultHTTPErrorsString = "400,404,500,502"
3131
32- var DefaultHttpErrorsSlice = []int {400 , 404 , 500 , 502 }
32+ var DefaultHTTPErrorsSlice = []int {400 , 404 , 500 , 502 }
3333
3434func buildIngress () * networking.Ingress {
3535 return & networking.Ingress {
@@ -54,7 +54,7 @@ func TestParseCodes(t *testing.T) {
5454 ing := buildIngress ()
5555
5656 data := map [string ]string {}
57- data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHttpErrorsString
57+ data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHTTPErrorsString
5858 ing .SetAnnotations (data )
5959
6060 i , err := NewParser (& resolver.Mock {}).Parse (ing )
@@ -66,7 +66,7 @@ func TestParseCodes(t *testing.T) {
6666 t .Errorf ("expected a []int type" )
6767 }
6868
69- expected := DefaultHttpErrorsSlice
69+ expected := DefaultHTTPErrorsSlice
7070 if ! reflect .DeepEqual (expected , val ) {
7171 t .Errorf ("expected %v but got %v" , expected , val )
7272 }
@@ -77,7 +77,7 @@ func TestEnabledSwitch(t *testing.T) {
7777
7878 data := map [string ]string {}
7979 data [parser .GetAnnotationWithPrefix ("enable-custom-http-errors" )] = "true"
80- data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHttpErrorsString
80+ data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHTTPErrorsString
8181 ing .SetAnnotations (data )
8282
8383 i , err := NewParser (& resolver.Mock {}).Parse (ing )
@@ -89,7 +89,7 @@ func TestEnabledSwitch(t *testing.T) {
8989 t .Errorf ("expected a []int type" )
9090 }
9191
92- expected := DefaultHttpErrorsSlice
92+ expected := DefaultHTTPErrorsSlice
9393 if ! reflect .DeepEqual (expected , val ) {
9494 t .Errorf ("expected %v but got %v" , expected , val )
9595 }
@@ -100,7 +100,7 @@ func TestDisabledSwitch(t *testing.T) {
100100
101101 data := map [string ]string {}
102102 data [parser .GetAnnotationWithPrefix ("enable-custom-http-errors" )] = "false"
103- data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHttpErrorsString
103+ data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHTTPErrorsString
104104 ing .SetAnnotations (data )
105105
106106 i , err := NewParser (& resolver.Mock {}).Parse (ing )
@@ -123,7 +123,7 @@ func TestEnabledByDefault(t *testing.T) {
123123
124124 data := map [string ]string {}
125125 data [parser .GetAnnotationWithPrefix ("enable-custom-http-errors" )] = "fakebool"
126- data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHttpErrorsString
126+ data [parser .GetAnnotationWithPrefix ("custom-http-errors" )] = DefaultHTTPErrorsString
127127 ing .SetAnnotations (data )
128128
129129 i , err := NewParser (& resolver.Mock {}).Parse (ing )
@@ -135,7 +135,7 @@ func TestEnabledByDefault(t *testing.T) {
135135 t .Errorf ("expected a []int type" )
136136 }
137137
138- expected := DefaultHttpErrorsSlice
138+ expected := DefaultHTTPErrorsSlice
139139 if ! reflect .DeepEqual (expected , val ) {
140140 t .Errorf ("expected %v but got %v" , expected , val )
141141 }
0 commit comments