diff options
| author | Emīls <emils@mullvad.net> | 2025-01-02 11:04:24 +0100 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2025-01-02 11:04:24 +0100 |
| commit | 38ae9e95cfab138c403bfd760c9ed7041e78e8fa (patch) | |
| tree | a5172d63a7db4f37d8c0b0f0e8606cdbf5255f03 /test | |
| parent | 9e98f669a978aee8b656f520a8b952175d88e921 (diff) | |
| parent | 732397b7abe1f29c5b53d22a5fd5876817b4855d (diff) | |
| download | mullvadvpn-38ae9e95cfab138c403bfd760c9ed7041e78e8fa.tar.xz mullvadvpn-38ae9e95cfab138c403bfd760c9ed7041e78e8fa.zip | |
Merge branch 'investigate-why-testcreateaccount-started-failing-on-main-ios-952'
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-manager/src/tests/account.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/test-manager/src/tests/account.rs b/test/test-manager/src/tests/account.rs index 7fe14ae58e..29227cc82b 100644 --- a/test/test-manager/src/tests/account.rs +++ b/test/test-manager/src/tests/account.rs @@ -278,9 +278,8 @@ pub async fn clear_devices(device_client: &DevicesProxy) -> anyhow::Result<()> { } pub async fn new_device_client() -> anyhow::Result<DevicesProxy> { - use mullvad_api::{proxy::ApiConnectionMode, ApiEndpoint, API}; + use mullvad_api::{proxy::ApiConnectionMode, ApiEndpoint}; - let api_endpoint = ApiEndpoint::from_env_vars(); let api_host = format!("api.{}", TEST_CONFIG.mullvad_host); let api_host_with_port = format!("{api_host}:443"); @@ -289,14 +288,10 @@ pub async fn new_device_client() -> anyhow::Result<DevicesProxy> { .context("failed to resolve API host")?; // Override the API endpoint to use the one specified in the test config - let _ = API.override_init(ApiEndpoint { - host: Some(api_host), - address: Some(api_address), - ..api_endpoint - }); + let endpoint = ApiEndpoint::new(api_host, api_address, false); + + let api = mullvad_api::Runtime::new(tokio::runtime::Handle::current(), &endpoint); - let api = mullvad_api::Runtime::new(tokio::runtime::Handle::current()) - .expect("failed to create api runtime"); let rest_handle = api.mullvad_rest_handle(ApiConnectionMode::Direct.into_provider()); Ok(DevicesProxy::new(rest_handle)) } |
