public void UpdateProfileDifferentType() { using (var tester = new SharedCredentialsFileTestFixture()) { tester.AssertWriteProfile("updated_profile", UpdatedProfileTypeOptionsBefore, UpdatedProfileTypePropertiesBeforeAndAfter, UpdatedProfileTypeTextBefore); tester.AssertWriteProfile("updated_profile", UpdatedProfileTypeOptionsAfter, UpdatedProfileTypePropertiesBeforeAndAfter, UpdatedProfileTypeTextAfter); } }
public void WriteEndpointDiscoveryEnabledOnlyProfile() { using (var tester = new SharedCredentialsFileTestFixture()) { tester.AssertWriteProfile("endpoint_discovery_enabled_only_profile", EndpointDiscoveryEnabledOnlyProfileOptions, true, EndpointDiscoveryEnabledOnlyProfileText); } }
public void WriteRegionOnlyProfile() { using (var tester = new SharedCredentialsFileTestFixture(RegionOnlyProfileText)) { tester.AssertWriteProfile("region_only_profile", RegionOnlyProfileOptions, RegionOnlyProfileText); } }
public void WriteAssumeRoleMfaProfile() { using (var tester = new SharedCredentialsFileTestFixture()) { tester.AssertWriteProfile("assume_role_mfa_profile", AssumeRoleMfaProfileOptions, AssumeRoleMfaProfileText); } }
public void WriteSessionProfile() { using (var tester = new SharedCredentialsFileTestFixture()) { tester.AssertWriteProfile("session_profile", SessionProfileOptions, SessionProfileText); } }
public void WriteBasicProfile() { using (var tester = new SharedCredentialsFileTestFixture()) { tester.AssertWriteProfile("basic_profile", BasicProfileOptions, RegionEndpoint.CACentral1, UniqueKey, BasicProfileCredentialsText); } }
public void UpdateProfileWithProperties() { using (var tester = new SharedCredentialsFileTestFixture(UpdatedProfileWithPropertiesTextBefore)) { tester.ReadAndAssertProfile("basic_profile", UpdatedProfileWithPropertiesOptions, UpdatedProfileWithPropertiesBefore); tester.AssertWriteProfile("basic_profile", UpdatedProfileWithPropertiesOptions, UpdatedProfileWithPropertiesAfter, UpdatedProfileWithPropertiesTextAfter); } }
public void UpdateProfile() { using (var tester = new SharedCredentialsFileTestFixture(SessionProfileText)) { tester.ReadAndAssertProfile("session_profile", SessionProfileOptions); tester.AssertWriteProfile("session_profile", SessionProfileOptionsUpdated, SessionProfileTextUpdated); } }
public void WriteUnsupportedProfileType() { using (var tester = new SharedCredentialsFileTestFixture()) { AssertExtensions.ExpectException(() => { tester.AssertWriteProfile("saml_role_profile", SAMLRoleProfileOptions, null); }, typeof(ArgumentException), new Regex("SharedCredentialsFile does not support the SAMLRoleUserIdentity profile type.")); } }
public void WriteInvalidProfile() { using (var tester = new SharedCredentialsFileTestFixture(InvalidProfileText)) { AssertExtensions.ExpectException(() => { tester.AssertWriteProfile("invalid_profile", InvalidProfileOptions, InvalidProfileText); }, typeof(ArgumentException), new Regex("The CredentialProfile provided is not a valid profile.")); } }
private void TestReservedProperty(string propertyName) { using (var tester = new SharedCredentialsFileTestFixture()) { var properties = new Dictionary <string, string>() { { propertyName, "aargh!" } }; AssertExtensions.ExpectException(() => { tester.AssertWriteProfile("basic_profile", BasicProfileOptions, properties, BasicProfileCredentialsText); }, typeof(ArgumentException), "The profile properties dictionary cannot contain a key named " + propertyName + " because it is in the name mapping dictionary."); } }