Move middleware context handler logic to service (#29605)
* middleware: Move context handler to own service Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Emil Tullsted <sakjur@users.noreply.github.com> Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
co-authored by
Emil Tullsted
Will Browne
parent
d0f52d5334
commit
12661e8a9d
@@ -133,7 +133,7 @@ func TestLoadingSettings(t *testing.T) {
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(Domain, ShouldEqual, "test2")
|
||||
So(cfg.Domain, ShouldEqual, "test2")
|
||||
})
|
||||
|
||||
Convey("Defaults can be overridden in specified config file", func() {
|
||||
@@ -239,7 +239,7 @@ func TestLoadingSettings(t *testing.T) {
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(AuthProxySyncTtl, ShouldEqual, 2)
|
||||
So(cfg.AuthProxySyncTTL, ShouldEqual, 2)
|
||||
})
|
||||
|
||||
Convey("Only ldap_sync_ttl should return the value ldap_sync_ttl", func() {
|
||||
@@ -250,7 +250,7 @@ func TestLoadingSettings(t *testing.T) {
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(AuthProxySyncTtl, ShouldEqual, 5)
|
||||
So(cfg.AuthProxySyncTTL, ShouldEqual, 5)
|
||||
})
|
||||
|
||||
Convey("ldap_sync should override ldap_sync_ttl that is default value", func() {
|
||||
@@ -261,7 +261,7 @@ func TestLoadingSettings(t *testing.T) {
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(AuthProxySyncTtl, ShouldEqual, 5)
|
||||
So(cfg.AuthProxySyncTTL, ShouldEqual, 5)
|
||||
})
|
||||
|
||||
Convey("ldap_sync should not override ldap_sync_ttl that is different from default value", func() {
|
||||
@@ -272,7 +272,7 @@ func TestLoadingSettings(t *testing.T) {
|
||||
})
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(AuthProxySyncTtl, ShouldEqual, 12)
|
||||
So(cfg.AuthProxySyncTTL, ShouldEqual, 12)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user