1
0
Fork 0

Fix panic for empty defaultBackend and defaultBackend without resources

This commit is contained in:
Gina A. 2026-01-07 09:38:05 +01:00 committed by GitHub
parent be27044099
commit 5d00096f82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 0 deletions

View file

@ -550,6 +550,26 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
},
},
},
{
desc: "Ingress with defaultbackend with resource",
expected: &dynamic.Configuration{
HTTP: &dynamic.HTTPConfiguration{
Middlewares: map[string]*dynamic.Middleware{},
Routers: map[string]*dynamic.Router{},
Services: map[string]*dynamic.Service{},
},
},
},
{
desc: "Ingress with empty defaultbackend",
expected: &dynamic.Configuration{
HTTP: &dynamic.HTTPConfiguration{
Middlewares: map[string]*dynamic.Middleware{},
Routers: map[string]*dynamic.Router{},
Services: map[string]*dynamic.Service{},
},
},
},
{
desc: "Ingress with one service without endpoint",
expected: &dynamic.Configuration{