| 1 | package ram |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | ) |
| 6 | |
| 7 | var ( |
| 8 | accountAliasRequest = AccountAliasRequest{AccountAlias: "hello"} |
| 9 | passwordPolicy = PasswordPolicyRequest{ |
| 10 | PasswordPolicy: PasswordPolicy{ |
| 11 | MinimumPasswordLength: 10, |
| 12 | RequireLowercaseCharacters: true, |
| 13 | RequireUppercaseCharacters: true, |
| 14 | RequireNumbers: true, |
| 15 | RequireSymbols: true, |
| 16 | }, |
| 17 | } |
| 18 | ) |
| 19 | |
| 20 | func TestSetAccountAlias(t *testing.T) { |
| 21 | client := NewTestClient() |
| 22 | resp, err := client.SetAccountAlias(accountAliasRequest) |
| 23 | if err != nil { |
| 24 | t.Errorf("Failed to SetAccountAlias %v", err) |
| 25 | } |
| 26 | t.Logf("pass SetAccountAlias %v", resp) |
| 27 | } |
| 28 | |
| 29 | func TestGetAccountAlias(t *testing.T) { |
| 30 | client := NewTestClient() |
| 31 | resp, err := client.GetAccountAlias() |
| 32 | if err != nil { |
| 33 | t.Errorf("Failed to GetAccountAlias %v", err) |
| 34 | } |
| 35 | t.Logf("pass GetAccountAlias %v", resp) |
| 36 | } |
| 37 | |
| 38 | func TestClearAccountAlias(t *testing.T) { |
| 39 | client := NewTestClient() |
| 40 | resp, err := client.ClearAccountAlias() |
| 41 | if err != nil { |
| 42 | t.Errorf("Failed to ClearAccountAlias %v", err) |
| 43 | } |
| 44 | t.Logf("pass ClearAccountAlias %v", resp) |
| 45 | } |
| 46 | |
| 47 | func TestSetPasswordPolicy(t *testing.T) { |
| 48 | client := NewTestClient() |
| 49 | resp, err := client.SetPasswordPolicy(passwordPolicy) |
| 50 | if err != nil { |
| 51 | t.Errorf("Failed to pass SetPasswordPolicy %v", err) |
| 52 | } |
| 53 | t.Logf("pass SetPasswordPolicy %v", resp) |
| 54 | } |
| 55 | |
| 56 | func TestGetPasswordPolicy(t *testing.T) { |
| 57 | client := NewTestClient() |
| 58 | resp, err := client.GetPasswordPolicy() |
| 59 | if err != nil { |
| 60 | t.Errorf("Failed to pass GetPasswordPolicy %v", err) |
| 61 | } |
| 62 | t.Logf("pass GetPasswordPolicy %v", resp) |
| 63 | } |