aws: test timeout when no credenrtials are set

This commit is contained in:
Adrien Delorme 2019-01-18 11:43:52 +01:00
parent 4f1ed08f19
commit 5cfc1a52cd
1 changed files with 11 additions and 0 deletions

View File

@ -68,3 +68,14 @@ func TestAccessConfigPrepare_RegionRestricted(t *testing.T) {
t.Fatal("We should be in gov region.")
}
}
func TestAccessConfig_NoCredentialsFailsQuickly(t *testing.T) {
c := &AccessConfig{
RawRegion: "not-empty",
}
_, err := c.Session()
if err == nil {
t.Errorf("AccessConfig.Session() error is nil")
return
}
}