public void TestDisableHttpCustomization() { TestDelegatingHandler handler = new TestDelegatingHandler(); HDInsightManagementClient client = GetHDInsightUnitTestingClient(handler); client.Configurations.BeginDisablingHttp(ResourceGroupName, ClusterName); client.Configurations.BeginUpdate(ResourceGroupName, ClusterName, ConfigurationKey.Gateway, ConfigurationsConverter.Convert(new HttpConnectivitySettings { EnabledCredential = "False" })); Assert.Equal(handler.Requests[0], handler.Requests[1]); }
public void TestEnableHttpCustomization() { TestDelegatingHandler handler = new TestDelegatingHandler(); HDInsightManagementClient client = GetHDInsightUnitTestingClient(handler); string username = "******"; string password = "******"; client.Configurations.BeginEnablingHttp(ResourceGroupName, ClusterName, username, password); client.Configurations.BeginUpdate(ResourceGroupName, ClusterName, ConfigurationKey.Gateway, ConfigurationsConverter.Convert(new HttpConnectivitySettings { EnabledCredential = "true", Password = password, Username = username })); Assert.Equal(handler.Requests[0], handler.Requests[1]); }
public void TestHttpExtended() { string clusterName = "hdisdk-http"; string testName = "CanDisableEnableDisableHttpExtended"; string suiteName = GetType().FullName; ClusterCreateParameters createParams = ClusterCreateParametersHelpers.GetCustomCreateParametersIaas(testName); HDInsightManagementTestUtilities.CreateClusterInNewResourceGroupAndRunTest(suiteName, testName, clusterName, createParams, (client, rgName) => { var httpSettings = client.Configurations.Get(rgName, clusterName, ConfigurationKey.Gateway); ValidateHttpSettings(httpSettings, createParams.UserName, createParams.Password); string newPassword = "******"; client.Configurations.Update(rgName, clusterName, ConfigurationKey.Gateway, ConfigurationsConverter.Convert(new HttpConnectivitySettings { EnabledCredential = "true", Username = "******", Password = newPassword })); httpSettings = client.Configurations.Get(rgName, clusterName, ConfigurationKey.Gateway); ValidateHttpSettings(httpSettings, createParams.UserName, newPassword); }); }