summaryrefslogtreecommitdiff
path: root/state_test.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-05 13:17:24 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-05 13:17:24 +0200
commit1865b016d0cca74cd3703db5a3b4217917988dec (patch)
tree3da84dbc4f1ad49221c25fb83f402d27deb34138 /state_test.go
parente39b9a8a405fa8e5f73c32bb03a3f349f7f9f92d (diff)
Refactor: Handling of different servers and identifiers
- Uses OrgID for Secure Internet and gets the data from discovery - Uses URL for Institute/Custom and gets the data from discovery - Implements SKIP WAYF as we now have the needed data - Implements an initial change location with a default location (NL right now)
Diffstat (limited to 'state_test.go')
-rw-r--r--state_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/state_test.go b/state_test.go
index 76f4763..c42b314 100644
--- a/state_test.go
+++ b/state_test.go
@@ -72,7 +72,7 @@ func Test_server(t *testing.T) {
stateCallback(t, old, new, data, state)
}, false)
- _, _, configErr := state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr := state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("Connect error: %v", configErr)
@@ -95,7 +95,7 @@ func test_connect_oauth_parameter(t *testing.T, parameters httpw.URLParameters,
}
}, false)
- _, _, configErr := state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr := state.GetConfigCustomServer(serverURI, false)
var wrappedErr *types.WrappedErrorMessage
@@ -157,7 +157,7 @@ func Test_token_expired(t *testing.T) {
stateCallback(t, old, new, data, state)
}, false)
- _, _, configErr := state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr := state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("Connect error before expired: %v", configErr)
@@ -205,7 +205,7 @@ func Test_token_invalid(t *testing.T) {
stateCallback(t, old, new, data, state)
}, false)
- _, _, configErr := state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr := state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("Connect error before invalid: %v", configErr)
@@ -229,7 +229,7 @@ func Test_token_invalid(t *testing.T) {
oauth.Token.Access = dummy_value
oauth.Token.Refresh = dummy_value
- _, _, configErr = state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr = state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("Connect error after invalid: %v", configErr)
@@ -255,7 +255,7 @@ func Test_invalid_profile_corrected(t *testing.T) {
stateCallback(t, old, new, data, state)
}, false)
- _, _, configErr := state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr := state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("First connect error: %v", configErr)
@@ -274,7 +274,7 @@ func Test_invalid_profile_corrected(t *testing.T) {
previousProfile := base.Profiles.Current
base.Profiles.Current = "IDONOTEXIST"
- _, _, configErr = state.GetConfigInstituteAccess(serverURI, false)
+ _, _, configErr = state.GetConfigCustomServer(serverURI, false)
if configErr != nil {
t.Fatalf("Second connect error: %v", configErr)