(t *testing.T, got, want []byte)
| 145 | } |
| 146 | |
| 147 | func compJSON(t *testing.T, got, want []byte) { |
| 148 | t.Helper() |
| 149 | gotJSON := &bytes.Buffer{} |
| 150 | wantJSON := &bytes.Buffer{} |
| 151 | |
| 152 | if err := json.Indent(gotJSON, got, "", " "); err != nil { |
| 153 | t.Errorf("got invalid JSON: %v", err) |
| 154 | } |
| 155 | if err := json.Indent(wantJSON, want, "", " "); err != nil { |
| 156 | t.Errorf("want invalid JSON: %v", err) |
| 157 | } |
| 158 | g := strings.TrimSpace(gotJSON.String()) |
| 159 | w := strings.TrimSpace(wantJSON.String()) |
| 160 | if g != w { |
| 161 | t.Errorf("wanted %q, got %q", w, g) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | func TestRefreshCreds(t *testing.T) { |
| 166 | tests := []struct { |
no test coverage detected