MCPcopy
hub / github.com/grafana/tempo / TestCredentials

Function TestCredentials

tempodb/backend/azure/azure_test.go:26–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func 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
46func TestHedge(t *testing.T) {
47 tests := []struct {

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
fakeServerFunction · 0.70
ErrorMethod · 0.65

Tested by

no test coverage detected