diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:11:31 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:11:31 +0200 |
| commit | b950e027b3553ccc767f88be8e88a1b3acf1b383 (patch) | |
| tree | 5342e9fd19b8d2704866c137b57a78ee0d665e74 /state_test.go | |
| parent | 47d8fafada8c7c1377b9172862f25c576c4c3c08 (diff) | |
Tests: Remove local well known workaround
See: https://github.com/eduvpn/vpn-user-portal/pull/204 as an alternative
Diffstat (limited to 'state_test.go')
| -rw-r--r-- | state_test.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/state_test.go b/state_test.go index 849c735..c665958 100644 --- a/state_test.go +++ b/state_test.go @@ -17,14 +17,6 @@ import ( "github.com/eduvpn/eduvpn-common/types" ) -func ensureLocalWellKnown() { - wellKnown := os.Getenv("SERVER_IS_LOCAL") - - if wellKnown == "1" { - server.WellKnownPath = "well-known.php" - } -} - func getServerURI(t *testing.T) string { serverURI := os.Getenv("SERVER_URI") if serverURI == "" { @@ -80,7 +72,6 @@ func stateCallback( func Test_server(t *testing.T) { serverURI := getServerURI(t) state := &VPNState{} - ensureLocalWellKnown() registerErr := state.Register( "org.eduvpn.app.linux", @@ -168,8 +159,6 @@ func Test_connect_oauth_parameters(t *testing.T) { {&failedCallbackStateMatchError, httpw.URLParameters{"code": "42", "state": "21"}}, } - ensureLocalWellKnown() - for _, test := range tests { test_connect_oauth_parameter(t, test.parameters, test.expectedErr) } @@ -185,8 +174,6 @@ func Test_token_expired(t *testing.T) { return } - ensureLocalWellKnown() - // Convert the env variable to an int and signal error if it is not possible expiredInt, expiredErr := strconv.Atoi(expiredTTL) if expiredErr != nil { @@ -250,8 +237,6 @@ func Test_token_invalid(t *testing.T) { serverURI := getServerURI(t) state := &VPNState{} - ensureLocalWellKnown() - registerErr := state.Register( "org.eduvpn.app.linux", "configsinvalid", @@ -303,8 +288,6 @@ func Test_invalid_profile_corrected(t *testing.T) { serverURI := getServerURI(t) state := &VPNState{} - ensureLocalWellKnown() - registerErr := state.Register( "org.eduvpn.app.linux", "configscancelprofile", @@ -356,8 +339,6 @@ func Test_prefer_tcp(t *testing.T) { serverURI := getServerURI(t) state := &VPNState{} - ensureLocalWellKnown() - registerErr := state.Register( "org.eduvpn.app.linux", "configsprefertcp", |
