This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
forked from raystack/dex
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(warden): added warden host as a config
- Loading branch information
Sudheer Pal
committed
Oct 11, 2023
1 parent
d3cd79b
commit d1f60e8
Showing
6 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ func TestHandler_teamList(t *testing.T) { | |
req.Header.Add("X-Auth-Email", "[email protected]") | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(nil, doer)(router) | ||
warden.Routes(nil, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusOK, resp.Code) | ||
|
@@ -112,7 +112,7 @@ func TestHandler_teamList(t *testing.T) { | |
req.Header.Add("X-Auth-Email", "[email protected]") | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(shieldClient, doer)(router) | ||
warden.Routes(shieldClient, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusNotFound, resp.Code) | ||
|
@@ -127,7 +127,7 @@ func TestHandler_teamList(t *testing.T) { | |
require.NoError(t, err) | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(shieldClient, doer)(router) | ||
warden.Routes(shieldClient, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusUnauthorized, resp.Code) | ||
|
@@ -198,7 +198,7 @@ func TestHandler_updateGroup(t *testing.T) { | |
require.NoError(t, err) | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(shieldClient, doer)(router) | ||
warden.Routes(shieldClient, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusOK, resp.Code) | ||
|
@@ -235,7 +235,7 @@ func TestHandler_updateGroup(t *testing.T) { | |
require.NoError(t, err) | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(shieldClient, doer)(router) | ||
warden.Routes(shieldClient, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusInternalServerError, resp.Code) | ||
|
@@ -250,7 +250,7 @@ func TestHandler_updateGroup(t *testing.T) { | |
require.NoError(t, err) | ||
router := chi.NewRouter() | ||
router.Use(reqctx.WithRequestCtx()) | ||
warden.Routes(shieldClient, doer)(router) | ||
warden.Routes(shieldClient, doer, "")(router) | ||
router.ServeHTTP(resp, req) | ||
|
||
assert.Equal(t, http.StatusBadRequest, resp.Code) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters