(t *testing.T)
| 24 | ) |
| 25 | |
| 26 | func TestCredentials(t *testing.T) { |
| 27 | t.Parallel() |
| 28 | _, _, _, err := New(&Config{}) |
| 29 | require.Error(t, err) |
| 30 | |
| 31 | os.Setenv("AZURE_STORAGE_ACCOUNT", "testing") |
| 32 | os.Setenv("AZURE_STORAGE_KEY", "dGVzdGluZwo=") |
| 33 | |
| 34 | defer os.Unsetenv("AZURE_STORAGE_ACCOUNT") |
| 35 | defer os.Unsetenv("AZURE_STORAGE_KEY") |
| 36 | |
| 37 | count := int32(0) |
| 38 | server := fakeServer(t, 1*time.Second, &count) |
| 39 | |
| 40 | _, _, _, err = New(&Config{ |
| 41 | Endpoint: server.URL[7:], // [7:] -> strip http://, |
| 42 | }) |
| 43 | require.NoError(t, err) |
| 44 | } |
| 45 | |
| 46 | func TestHedge(t *testing.T) { |
| 47 | tests := []struct { |
nothing calls this directly
no test coverage detected