MCPcopy
hub / github.com/minio/minio-go / TestIAMFailServer

Function TestIAMFailServer

pkg/credentials/iam_aws_test.go:165–178  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

163}
164
165func TestIAMFailServer(t *testing.T) {
166 server := initTestFailServer()
167 defer server.Close()
168
169 creds := NewIAM(server.URL)
170
171 _, err := creds.GetWithContext(defaultCredContext)
172 if err == nil {
173 t.Fatal("Unexpected should fail here")
174 }
175 if err.Error() != "400 Bad Request" {
176 t.Fatalf("Expected '400 Bad Request', got %s", err)
177 }
178}
179
180func TestIAMNoRoles(t *testing.T) {
181 server := initTestServerNoRoles()

Callers

nothing calls this directly

Calls 5

initTestFailServerFunction · 0.85
NewIAMFunction · 0.85
GetWithContextMethod · 0.80
CloseMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected