diff options
| -rw-r--r-- | docs/src/gettingstarted/testing.md | 1 | ||||
| -rw-r--r-- | state_test.go | 19 |
2 files changed, 0 insertions, 20 deletions
diff --git a/docs/src/gettingstarted/testing.md b/docs/src/gettingstarted/testing.md index f3a47b6..62abfaf 100644 --- a/docs/src/gettingstarted/testing.md +++ b/docs/src/gettingstarted/testing.md @@ -29,7 +29,6 @@ This script is also used in the continuous integration, so we recommend to run t There are other environment variables that can be used: - `OAUTH_EXPIRED_TTL`: Use this for a server which has a low OAuth access token expiry time, e.g. 10 seconds. You would then set this variable to `"10"` so that a test is ran which waits for 10 seconds for the OAuth tokens to expire -- `SERVER_IS_LOCAL`: Set this to `"1"` such that the server endpoints are taken from `$SERVER_URI/well-known.php` instead of `SERVER_URI/.well-known/vpn-user-portal`. This is common for local development servers ## Testing the wrappers To test the wrappers, issue the following command in a shell (you will need dependencies for all wrappers if you do this[^1]): 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", |
