Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andriikushch committed Nov 14, 2024
1 parent 6a0762a commit 6ed2354
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/resources/cloudprovider/azure_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func TestAcc_AzureCredential(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()

defer os.Setenv("GRAFANA_CLOUD_PROVIDER_URL", os.Getenv("GRAFANA_CLOUD_PROVIDER_URL"))
defer os.Setenv("GRAFANA_CLOUD_PROVIDER_ACCESS_TOKEN", os.Getenv("GRAFANA_CLOUD_PROVIDER_ACCESS_TOKEN"))

// set this to use the mock server
_ = os.Setenv("GRAFANA_CLOUD_PROVIDER_URL", server.URL)
_ = os.Setenv("GRAFANA_CLOUD_PROVIDER_ACCESS_TOKEN", "some_token")

Expand Down

0 comments on commit 6ed2354

Please sign in to comment.