@@ -17,7 +17,7 @@ public void TestGetConfigurations()
1717 {
1818 TestInitialize ( ) ;
1919
20- string clusterName = TestUtilities . GenerateName ( "hdisdk-humboldt " ) ;
20+ string clusterName = TestUtilities . GenerateName ( "hdisdk-configs " ) ;
2121 var createParams = CommonData . PrepareClusterCreateParamsForWasb ( ) ;
2222 var hiveConfig = new Dictionary < string , string >
2323 {
@@ -54,41 +54,20 @@ public void TestGetConfigurations()
5454 var yarn = HDInsightClient . Configurations . Get ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . YarnSite ) ;
5555 Assert . Equal ( yarnConfig , yarn ) ;
5656
57- var gateway = HDInsightClient . Configurations . Get ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . Gateway ) ;
58- Assert . Equal ( 3 , gateway . Count ) ;
59-
6057 var core = HDInsightClient . Configurations . Get ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . CoreSite ) ;
6158 Assert . Equal ( 2 , core . Count ) ;
6259 Assert . True ( core . ContainsKey ( Constants . StorageConfigurations . DefaultFsKey ) ) ;
6360 Assert . Contains ( core , c => c . Key . StartsWith ( "fs.azure.account.key." ) ) ;
64- }
6561
66- [ Fact ]
67- public void TestHttpExtended ( )
68- {
69- TestInitialize ( ) ;
70-
71- string clusterName = TestUtilities . GenerateName ( "hdisdk-http" ) ;
72- var createParams = CommonData . PrepareClusterCreateParamsForWasb ( ) ;
73- var cluster = HDInsightClient . Clusters . Create ( CommonData . ResourceGroupName , clusterName , createParams ) ;
74- ValidateCluster ( clusterName , createParams , cluster ) ;
75-
76- string expectedUserName = CommonData . ClusterUserName ;
77- string expectedPassword = CommonData . ClusterPassword ;
78- var httpSettings = HDInsightClient . Configurations . Get ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . Gateway ) ;
79- ValidateHttpSettings ( expectedUserName , expectedPassword , httpSettings ) ;
80-
81- string newExpectedPassword = "NewPassword1!" ;
82- var updateParams = new Dictionary < string , string >
83- {
84- { "restAuthCredential.isEnabled" , "true" } ,
85- { "restAuthCredential.username" , expectedUserName } ,
86- { "restAuthCredential.password" , newExpectedPassword }
87- } ;
88-
89- HDInsightClient . Configurations . Update ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . Gateway , updateParams ) ;
90- httpSettings = HDInsightClient . Configurations . Get ( CommonData . ResourceGroupName , clusterName , ConfigurationKey . Gateway ) ;
91- ValidateHttpSettings ( expectedUserName , newExpectedPassword , httpSettings ) ;
62+ var configs = HDInsightClient . Configurations . List ( CommonData . ResourceGroupName , clusterName ) ;
63+ Assert . NotNull ( configs ) ;
64+ Assert . Equal ( hiveConfig , configs . Configurations [ ConfigurationKey . HiveSite ] ) ;
65+ Assert . Equal ( mapredConfig , configs . Configurations [ ConfigurationKey . MapRedSite ] ) ;
66+ Assert . Equal ( yarnConfig , configs . Configurations [ ConfigurationKey . YarnSite ] ) ;
67+ Assert . Equal ( configurations [ ConfigurationKey . Gateway ] , configs . Configurations [ ConfigurationKey . Gateway ] ) ;
68+ Assert . Equal ( 2 , core . Count ) ;
69+ Assert . True ( core . ContainsKey ( Constants . StorageConfigurations . DefaultFsKey ) ) ;
70+ Assert . Contains ( core , c => c . Key . StartsWith ( "fs.azure.account.key." ) ) ;
9271 }
9372 }
9473}
0 commit comments