mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-16 04:29:15 +00:00
Further pursue of perfection.
This commit is contained in:
@@ -102,6 +102,13 @@ func TestTraefikConfigurationParsing(t *testing.T) {
|
||||
t.Fatalf("Handler is not of type *TraefikOidc")
|
||||
}
|
||||
|
||||
// Clean up the middleware when test finishes
|
||||
defer func() {
|
||||
if err := middleware.Close(); err != nil {
|
||||
t.Errorf("Failed to close middleware: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Check that templates were parsed correctly
|
||||
if len(tc.config.Headers) > 0 {
|
||||
if len(middleware.headerTemplates) != len(tc.config.Headers) {
|
||||
@@ -232,6 +239,13 @@ func TestIssue55ReproductionAttempt(t *testing.T) {
|
||||
t.Fatalf("Handler is not of type *TraefikOidc")
|
||||
}
|
||||
|
||||
// Clean up the middleware when test finishes
|
||||
defer func() {
|
||||
if err := middleware.Close(); err != nil {
|
||||
t.Errorf("Failed to close middleware: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Check that the header template was parsed
|
||||
if len(middleware.headerTemplates) != 1 {
|
||||
t.Errorf("Expected 1 header template, got %d", len(middleware.headerTemplates))
|
||||
|
||||
Reference in New Issue
Block a user