Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1470 from WindowsAzure/release

0.6.14 release
  • Loading branch information...
commit df72ec5d136bdc3e2c68b3f9b47d2a5c2704bc38 2 parents 173935e + da71da9
Abdelrahman Elogeel ogail authored
Showing with 12,610 additions and 4,688 deletions.
  1. +5 −0 CONTRIBUTING.md
  2. +14 −0 ChangeLog.txt
  3. +5 −5 README.md
  4. +3 −3 WindowsAzurePowershell/setup/azurecmd.wxs
  5. +8 −0 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs
  6. +8 −0 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs
  7. +3 −3 WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
  8. +2 −2 WindowsAzurePowershell/src/Management.ScenarioTest/Properties/AssemblyInfo.cs
  9. +48 −20 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1
  10. +56 −54 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/Common.ps1
  11. 0  ...rePowershell/src/Management.ScenarioTest/Resources/{ServiceManagemenet → ServiceManagement}/Common.ps1
  12. 0  ...ll/src/Management.ScenarioTest/Resources/{ServiceManagemenet → ServiceManagement}/VMProvisionTests.ps1
  13. +80 −12 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Websites/WebsitesTests.ps1
  14. +3 −0  WindowsAzurePowershell/src/Management.ScenarioTest/ServiceBusTests/ServiceBusNamespaceTests.cs
  15. +4 −3 ...shell/src/Management.ScenarioTest/{ServiceManagemenet → ServiceManagement}/VMProvisionScenarioTests.cs
  16. +28 −0 WindowsAzurePowershell/src/Management.ScenarioTest/WebsitesTests/WebsitesTests.cs
  17. +19 −4 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs
  18. +4 −1 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs
  19. +169 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
  20. +79 −48 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
  21. +6 −3 ...l/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureSubscriptionCmdletInfo.cs
  22. +5 −9 ...ll/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStorageAccountCmdletInfo.cs
  23. +0 −2  ...rshell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs
  24. +0 −2  ...rc/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdletSequence.cs
  25. +0 −2  ...rshell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs
  26. +8 −1 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs
  27. +64 −50 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs
  28. +25 −48 ...sAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
  29. +70 −35 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs
  30. +0 −1  WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/Utilities.cs
  31. +1 −0  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Management.ServiceManagement.Test.csproj
  32. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/AssemblyInfo.cs
  33. +14 −5 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/Resource.Designer.cs
  34. +4 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/Resource.resx
  35. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/storageAccountTestData.csv
  36. +2 −2 ...rshell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/AffinityGroups/GetAzureAffinityGroupTests.cs
  37. +2 −2 ...rshell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/AffinityGroups/NewAzureAffinityGroupTests.cs
  38. +2 −2 ...ell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/AffinityGroups/RemoveAzureAffinityGroupTests.cs
  39. +2 −2 ...rshell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/AffinityGroups/SetAzureAffinityGroupTests.cs
  40. +2 −2 ...Powershell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/Certificates/AddAzureCertificateTests.cs
  41. +2 −2 ...Powershell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/Certificates/GetAzureCertificateTests.cs
  42. +2 −2 ...ershell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/Certificates/RemoveAzureCertificateTests.cs
  43. +2 −2 ...l/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/HostedServices/MoveAzureDeploymentCommandTests.cs
  44. +2 −2 ...wershell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/StorageServices/AddAzureVhdCommandTests.cs
  45. +2 −2 ...hell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/StorageServices/GetAzureStorageAccountTests.cs
  46. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs
  47. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs
  48. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs
  49. +6 −6 ...owershell/src/Management.ServiceManagement/Microsoft.WindowsAzure.Management.ServiceManagement.dll-Help.xml
  50. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Properties/AssemblyInfo.cs
  51. +2 −2 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Properties/AssemblyInfo.cs
  52. +32 −32 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Resources/MockSessions.xml
  53. +2 −2 WindowsAzurePowershell/src/Management.SqlDatabase/Properties/AssemblyInfo.cs
  54. +551 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/Main.cs
  55. +75 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/Management.Storage.MsTest2.csproj
  56. +46 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/Properties/AssemblyInfo.cs
  57. +225 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/TestClassUnit.cs
  58. +52 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/TestContext2.cs
  59. +299 −0 WindowsAzurePowershell/src/Management.Storage.MsTest2/TestMethodUnit.cs
  60. +2 −2 WindowsAzurePowershell/src/Management.Storage.MsTestLib/Properties/AssemblyInfo.cs
  61. +10 −1 WindowsAzurePowershell/src/Management.Storage.MsTestLib/Test.cs
  62. +0 −3  WindowsAzurePowershell/src/Management.Storage.MsTestLib/TestConfig.cs
  63. +7 −6 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Agent.cs
  64. +119 −114 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/CLICommonBVT.cs
  65. +46 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/AnonymousBVT.cs
  66. +156 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/AzureEmulatorBVT.cs
  67. +53 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/ConnectionStringBVT.cs
  68. +51 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/EnvConnectionStringBVT.cs
  69. +56 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/NameKeyContextBVT.cs
  70. +220 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/AnonymousBVT.cs
  71. +81 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/ConnectionStringBVT.cs
  72. +84 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/EnvConnectionStringBVT.cs
  73. +86 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/NameKeyContextBVT.cs
  74. +73 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/SubScriptionBVT.cs
  75. +937 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/StorageBVT.cs
  76. +305 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Common/TestBase.cs
  77. +28 −3 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Management.Storage.ScenarioTest.csproj
  78. +169 −204 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/PowerShellAgent.cs
  79. +2 −2 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Properties/AssemblyInfo.cs
  80. +6 −1 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/PsTag.cs
  81. +3 −0  WindowsAzurePowershell/src/Management.Storage.ScenarioTest/README
  82. +1 −1  WindowsAzurePowershell/src/Management.Storage.ScenarioTest/StorageObjectType.cs
  83. +67 −6 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/TestData.xml
  84. +43 −9 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/CloudBlobUtil.cs
  85. +1 −1  WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/CloudQueueUtil.cs
  86. +13 −8 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/CloudTableUtil.cs
  87. +14 −4 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/FileUtil.cs
  88. +77 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/PowerShellExtension.cs
  89. +26 −5 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Utility.cs
  90. +2 −0  WindowsAzurePowershell/src/Management.Storage.ScenarioTest/storagetest.cmd
  91. +0 −1  WindowsAzurePowershell/src/Management.Storage.StorageTestLib/Helpers.cs
  92. +2 −2 WindowsAzurePowershell/src/Management.Storage.StorageTestLib/Properties/AssemblyInfo.cs
  93. +10 −0 WindowsAzurePowershell/src/Management.Storage.Test/Management.Storage.Test.csproj
  94. +2 −2 WindowsAzurePowershell/src/Management.Storage.Test/Properties/AssemblyInfo.cs
  95. +164 −0 WindowsAzurePowershell/src/Management.Storage.Test/Queue/GetAzureStorageQueueTest.cs
  96. +97 −0 WindowsAzurePowershell/src/Management.Storage.Test/Queue/NewAzureStorageQueueTest.cs
  97. +113 −0 WindowsAzurePowershell/src/Management.Storage.Test/Queue/RemoveAzureStorageQueueTest.cs
  98. +49 −0 WindowsAzurePowershell/src/Management.Storage.Test/Queue/StorageQueueTestBase.cs
  99. +150 −0 WindowsAzurePowershell/src/Management.Storage.Test/Service/MockStorageQueueManagement.cs
  100. +161 −0 WindowsAzurePowershell/src/Management.Storage.Test/Service/MockStorageTableManagement.cs
  101. +155 −0 WindowsAzurePowershell/src/Management.Storage.Test/Table/GetAzureStorageTableTest.cs
  102. +93 −0 WindowsAzurePowershell/src/Management.Storage.Test/Table/NewAzureStorageTableTest.cs
  103. +106 −0 WindowsAzurePowershell/src/Management.Storage.Test/Table/RemoveAzureStorageTableTest.cs
  104. +51 −0 WindowsAzurePowershell/src/Management.Storage.Test/Table/StorageTableStorageTestBase.cs
  105. +3 −3 WindowsAzurePowershell/src/Management.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs
  106. +2 −2 WindowsAzurePowershell/src/Management.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs
  107. +1 −1  WindowsAzurePowershell/src/Management.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
  108. +3 −1 WindowsAzurePowershell/src/Management.Storage/Common/Cmdlet/NewAzureStorageContext.cs
  109. +14 −0 WindowsAzurePowershell/src/Management.Storage/Management.Storage.csproj
  110. +1,515 −395 WindowsAzurePowershell/src/Management.Storage/Microsoft.WindowsAzure.Management.Storage.dll-Help.xml
  111. +82 −0 WindowsAzurePowershell/src/Management.Storage/Model/Contract/IStorageQueueManagement.cs
  112. +71 −0 WindowsAzurePowershell/src/Management.Storage/Model/Contract/IStorageTableManagement.cs
  113. +134 −0 WindowsAzurePowershell/src/Management.Storage/Model/Contract/StorageQueueManagement.cs
  114. +100 −0 WindowsAzurePowershell/src/Management.Storage/Model/Contract/StorageTableManagement.cs
  115. +30 −0 WindowsAzurePowershell/src/Management.Storage/Model/ResourceModel/AzureStorageBlob.cs
  116. +61 −0 WindowsAzurePowershell/src/Management.Storage/Model/ResourceModel/AzureStorageQueue.cs
  117. +49 −0 WindowsAzurePowershell/src/Management.Storage/Model/ResourceModel/AzureStorageTable.cs
  118. +2 −2 WindowsAzurePowershell/src/Management.Storage/Properties/AssemblyInfo.cs
  119. +186 −0 WindowsAzurePowershell/src/Management.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs
  120. +86 −0 WindowsAzurePowershell/src/Management.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs
  121. +133 −0 WindowsAzurePowershell/src/Management.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs
  122. +51 −0 WindowsAzurePowershell/src/Management.Storage/Queue/StorageQueueBaseCmdlet.cs
  123. +8 −8 WindowsAzurePowershell/src/Management.Storage/Resources.Designer.cs
  124. +4 −4 WindowsAzurePowershell/src/Management.Storage/Resources.resx
  125. +176 −0 WindowsAzurePowershell/src/Management.Storage/Table/Cmdlet/GetStorageAzureTable.cs
  126. +89 −0 WindowsAzurePowershell/src/Management.Storage/Table/Cmdlet/NewStorageAzureTable.cs
  127. +134 −0 WindowsAzurePowershell/src/Management.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs
  128. +52 −0 WindowsAzurePowershell/src/Management.Storage/Table/StorageCloudTableCmdletBase.cs
  129. +7 −6 WindowsAzurePowershell/src/Management.Test.Utilities/CloudService/ServiceSettingsTestData.cs
  130. +6 −6 WindowsAzurePowershell/src/Management.Test.Utilities/Common/AzureAssert.cs
  131. +3 −3 WindowsAzurePowershell/src/Management.Test.Utilities/Common/Data.cs
  132. +65 −0 WindowsAzurePowershell/src/Management.Test.Utilities/Common/EmbeddedFileWriter.cs
  133. +2 −0  WindowsAzurePowershell/src/Management.Test.Utilities/Common/Testing.cs
  134. +11 −7 WindowsAzurePowershell/src/Management.Test.Utilities/Management.Test.Utilities.csproj
  135. +2 −2 WindowsAzurePowershell/src/Management.Test.Utilities/Properties/AssemblyInfo.cs
  136. +29 −0 WindowsAzurePowershell/src/Management.Test.Utilities/Resources/GB18030ServiceDefinition.csdef
  137. +6 −7 ...t.Utilities/CloudService/IPublishListener.cs → Management.Test.Utilities/Resources/ResourceLocator.cs}
  138. +3 −3 WindowsAzurePowershell/src/Management.Test.Utilities/Websites/WebsitesTestBase.cs
  139. +12 −9 WindowsAzurePowershell/src/Management.Test/CloudService/Development/SetAzureServiceProjectTests.cs
  140. +0 −1,004 WindowsAzurePowershell/src/Management.Test/CloudService/PublishAzureServiceCommandTests.cs
  141. +70 −0 WindowsAzurePowershell/src/Management.Test/CloudService/PublishAzureServiceProjectTests.cs
  142. +35 −83 WindowsAzurePowershell/src/Management.Test/CloudService/RemoveAzureServiceTests.cs
  143. +16 −43 WindowsAzurePowershell/src/Management.Test/CloudService/StartAzureServiceTests.cs
  144. +16 −43 WindowsAzurePowershell/src/Management.Test/CloudService/StopAzureServiceTests.cs
  145. +238 −142 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/AzureServiceTests.cs
  146. +416 −0 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/CloudServiceClientTests.cs
  147. +23 −0 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/CsPackTests.cs
  148. +0 −164 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/DeploymentStatusManagerTests.cs
  149. +44 −0 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/GeneralTests.cs
  150. +91 −90 ...shell/src/Management.Test/CloudService/Utilities/{DeploymentSettingsTests.cs → PublishContextTests.cs}
  151. +2 −22 WindowsAzurePowershell/src/Management.Test/CloudService/Utilities/ServiceSettingsTests.cs
  152. +24 −3 WindowsAzurePowershell/src/Management.Test/Management.Test.csproj
  153. +2 −2 WindowsAzurePowershell/src/Management.Test/Properties/AssemblyInfo.cs
  154. +216 −0 WindowsAzurePowershell/src/Management.Test/Websites/DisableAzureWebsiteDiagnosticTests.cs
  155. +268 −0 WindowsAzurePowershell/src/Management.Test/Websites/EnableAzureWebsiteDiagnosticTests.cs
  156. +7 −7 WindowsAzurePowershell/src/Management.Test/Websites/GetAzureWebSiteTests.cs
  157. +2 −2 WindowsAzurePowershell/src/Management.Test/Websites/GetAzureWebsiteDeploymentTests.cs
  158. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/NewAzureWebSiteTests.cs
  159. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/RemoveAzureWebSiteTests.cs
  160. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/RestartAzureWebsiteTests.cs
  161. +2 −2 WindowsAzurePowershell/src/Management.Test/Websites/RestoreAzureWebsiteDeploymentTests.cs
  162. +2 −2 WindowsAzurePowershell/src/Management.Test/Websites/SaveAzureWebsiteLogTests.cs
  163. +5 −0 WindowsAzurePowershell/src/Management.Test/Websites/Services/GithubClientTests.cs
  164. +2 −2 WindowsAzurePowershell/src/Management.Test/Websites/SetAzureWebSiteTests.cs
  165. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/ShowAzureWebsiteTests.cs
  166. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/StartAzureWebSiteTests.cs
  167. +1 −1  WindowsAzurePowershell/src/Management.Test/Websites/StopAzureWebSiteTests.cs
  168. +5 −0 WindowsAzurePowershell/src/Management.Test/packages.config
  169. +87 −1 WindowsAzurePowershell/src/Management.Utilities/CloudService/AzureService.cs
  170. +0 −48 WindowsAzurePowershell/src/Management.Utilities/CloudService/CachingStorageConnectionStringUpdater.cs
  171. +869 −0 WindowsAzurePowershell/src/Management.Utilities/CloudService/CloudServiceClient.cs
  172. +0 −166 WindowsAzurePowershell/src/Management.Utilities/CloudService/DeploymentStatusManager.cs
  173. +0 −169 WindowsAzurePowershell/src/Management.Utilities/CloudService/GetDeploymentStatus.cs
  174. +133 −0 WindowsAzurePowershell/src/Management.Utilities/CloudService/ICloudServiceClient.cs
  175. +24 −10 WindowsAzurePowershell/src/Management.Utilities/CloudService/{DeploymentSettings.cs → PublishContext.cs}
  176. +15 −10 WindowsAzurePowershell/src/Management.Utilities/CloudService/ServiceSettings.cs
  177. +27 −47 WindowsAzurePowershell/src/Management.Utilities/Common/AzureBlob.cs
  178. +10 −7 WindowsAzurePowershell/src/Management.Utilities/Common/CloudBaseCmdlet.cs
  179. +91 −0 WindowsAzurePowershell/src/Management.Utilities/Common/CloudBlobUtility.cs
  180. +0 −52 WindowsAzurePowershell/src/Management.Utilities/Common/CloudStorageAccountFactory.cs
  181. +3 −4 WindowsAzurePowershell/src/Management.Utilities/Common/ErrorHelper.cs
  182. +40 −39 WindowsAzurePowershell/src/Management.Utilities/Common/General.cs
  183. +2 −68 WindowsAzurePowershell/src/Management.Utilities/Common/ManagementConstants.cs
  184. +16 −5 WindowsAzurePowershell/src/Management.Utilities/Common/ServiceManagementBaseCmdlet.cs
  185. +1 −1  WindowsAzurePowershell/src/Management.Utilities/{Store → Common}/SetHeaderInspector.cs
  186. +31 −32 WindowsAzurePowershell/src/Management.Utilities/Common/SubscriptionData.cs
  187. +5 −3 WindowsAzurePowershell/src/Management.Utilities/Common/Validate.cs
  188. +5 −7 WindowsAzurePowershell/src/Management.Utilities/Management.Utilities.csproj
  189. +4 −4 WindowsAzurePowershell/src/Management.Utilities/Microsoft.WindowsAzure.Management.Store.format.ps1xml
  190. +1 −1  WindowsAzurePowershell/src/Management.Utilities/PostBuildCleanup.bat
  191. +2 −2 WindowsAzurePowershell/src/Management.Utilities/Properties/AssemblyInfo.cs
  192. +2 −2 WindowsAzurePowershell/src/Management.Utilities/Properties/Resources.Designer.cs
  193. +1 −1  WindowsAzurePowershell/src/Management.Utilities/Properties/Resources.resx
  194. +6 −0 WindowsAzurePowershell/src/Management.Utilities/Websites/Common/IGithubCmdlet.cs
  195. +86 −17 WindowsAzurePowershell/src/Management.Utilities/Websites/IWebsitesClient.cs
  196. +3 −2 WindowsAzurePowershell/src/Management.Utilities/Websites/Services/DeploymentEntities/LogEntryType.cs
  197. +38 −22 WindowsAzurePowershell/src/Management.Utilities/Websites/Services/GithubClient.cs
  198. +32 −32 WindowsAzurePowershell/src/Management.Utilities/Websites/Services/WebsitesExtensionMethods.cs
  199. +162 −72 WindowsAzurePowershell/src/Management.Utilities/Websites/WebsitesClient.cs
  200. +1 −1  WindowsAzurePowershell/src/Management/CloudService/Development/SetAzureServiceProject.cs
  201. +16 −834 WindowsAzurePowershell/src/Management/CloudService/PublishAzureServiceProject.cs
  202. +17 −102 WindowsAzurePowershell/src/Management/CloudService/RemoveAzureService.cs
  203. +23 −23 WindowsAzurePowershell/src/Management/CloudService/StartAzureService.cs
  204. +23 −23 WindowsAzurePowershell/src/Management/CloudService/StopAzureService.cs
  205. +2 −0  WindowsAzurePowershell/src/Management/Management.csproj
  206. +2 −2 WindowsAzurePowershell/src/Management/Properties/AssemblyInfo.cs
  207. +8 −1 WindowsAzurePowershell/src/Management/Subscription/ImportAzurePublishSettings.cs
  208. +89 −0 WindowsAzurePowershell/src/Management/Websites/DisableAzureWebsiteDiagnostic.cs
  209. +106 −0 WindowsAzurePowershell/src/Management/Websites/EnableAzureWebsiteDiagnostic.cs
  210. +6 −2 WindowsAzurePowershell/src/Management/Websites/GetAzureWebSite.cs
  211. +5 −0 WindowsAzurePowershell/src/Management/Websites/NewAzureWebSite.cs
  212. +0 −38 WindowsAzurePowershell/src/Scenario.testsettings
  213. +2 −2 WindowsAzurePowershell/src/ServiceManagement.Additions/Properties/AssemblyInfo.cs
  214. +11 −0 WindowsAzurePowershell/src/WindowsAzurePowershell.sln
  215. +34 −1 build.proj
5 CONTRIBUTING.md
View
@@ -0,0 +1,5 @@
+# Contribute Code or Provide Feedback
+
+If you would like to become an active contributor to this project please follow the instructions provided in [Windows Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).
+
+If you encounter any bugs with Windows Azure PowerShell please file an issue in the [Issues](https://github.com/WindowsAzure/azure-sdk-tools/issues) section of the project.
14 ChangeLog.txt
View
@@ -1,3 +1,17 @@
+2013.05.08 Version 0.6.14
+* Windows Azure Storage Table cmdlets
+ * Get-AzureStorageTable
+ * New-AzureStorageTable
+ * Remove-AzureStorageTable
+* Windows Azure Storage Queue cmdlets
+ * Get-AzureStorageQueue
+ * New-AzureStorageQueue
+ * Remove-AzureStorageQueue
+* Fix an issue in Publish-AzureServiceProject when swapping between staging and production slot
+
+2013.04.23 Version 0.6.13.1
+* Hotfix to make Set-AzureStorageAccount behave correctly with the -GeoReplicationEnabled parameter
+
2013.04.16 Version 0.6.13
* Completely fixed issues with first website creatio on a new account. Now you can use PowerShell with a new account directly without the need to go to the Azure portal.
* BREAKING CHANGE: New-AzureVM and New-AzureQuickVM now require an –AdminUserName parameter when creating Windows based VMs.
10 README.md
View
@@ -1,10 +1,7 @@
# Windows Azure PowerShell
-This repo contains a set of PowerShell cmddlets for developers and administrators to deploy and manage
-Windows Azure applications. It includes the following:
-
-* Cmdlets for developers to deploy both node.js and PHP applications.
-* Cmdlets for IT Administrators to manage their Windows Azure environments.
+This repository contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage
+Windows Azure applications.
For documentation on how to build and deploy applications to Windows Azure please see the [Windows Azure Developer Center](http://www.windowsazure.com/en-us/develop). For comprehensive documentation on the developer cmdlets see [How to use Windows Azure PowerShell](http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/powershell-cmdlets/). For comprehensive documentation on the full set of Windows Azure cmdlets see [Windows Azure Management Center](http://go.microsoft.com/fwlink/?linkID=254459&clcid=0x409).
@@ -30,6 +27,8 @@ For documentation on how to build and deploy applications to Windows Azure pleas
* Manage storage account and access key.
* Manage storage container and blob.
* Copy storage blob.
+ * Manage storage table.
+ * Manage storage queue.
* SQL Azure
* CRUD support for database server, database and firewall rule
* Service Bus
@@ -60,6 +59,7 @@ For detail descriptions and examples of the cmdlets, type
* ```help azure``` to get all the cmdlets.
* ```help node-dev``` to get all Node.js development related cmdlets.
* ```help php-dev``` to get all PHP development related cmdlets.
+* ```help python-dev``` to get all Python development related cmdlets.
* ```get-help <cmdlet name>``` to get the details of a specific cmdlet.
# Getting Started
6 WindowsAzurePowershell/setup/azurecmd.wxs
View
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?define productName="Windows Azure PowerShell - April 2013" ?>
+ <?define productName="Windows Azure PowerShell - May 2013" ?>
<?define sourceDir="$(var.SolutionDir)..\..\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
- <?define version="0.6.13" ?>
+ <?define version="0.6.14" ?>
<?define azureSdkVersion="1.8" ?>
<?define versionedStartMenuFolder="Windows Azure" ?>
8 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs
View
@@ -73,5 +73,13 @@ public void TestStartAzureServiceWithEmptyDeployment()
{
RunPowerShellTest("Test-StartAzureServiceWithEmptyDeployment");
}
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.CloudService)]
+ public void TestStartAzureServiceWithoutName()
+ {
+ RunPowerShellTest("Test-StartAzureServiceWithoutName");
+ }
}
}
8 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs
View
@@ -73,5 +73,13 @@ public void TestStopAzureServiceWithEmptyDeployment()
{
RunPowerShellTest("Test-StopAzureServiceWithEmptyDeployment");
}
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.CloudService)]
+ public void TestStopAzureServiceWithoutName()
+ {
+ RunPowerShellTest("Test-StopAzureServiceWithoutName");
+ }
}
}
6 WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
View
@@ -126,7 +126,7 @@
<Compile Include="StorageTests\StorageContainerTest.cs" />
<Compile Include="StorageTests\StorageContextTest.cs" />
<Compile Include="StoreTests\StoreTests.cs" />
- <Compile Include="ServiceManagemenet\VMProvisionScenarioTests.cs" />
+ <Compile Include="ServiceManagement\VMProvisionScenarioTests.cs" />
<Compile Include="WebsitesTests\WebsitesTests.cs" />
<Compile Include="CredentialTests\CredentialTests.cs" />
<Compile Include="ManagementTests\ManagementTests.cs" />
@@ -166,10 +166,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
- <Resource Include="Resources\ServiceManagemenet\VMProvisionTests.ps1">
+ <Resource Include="Resources\ServiceManagement\VMProvisionTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
- <Resource Include="Resources\ServiceManagemenet\Common.ps1">
+ <Resource Include="Resources\ServiceManagement\Common.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<None Include="Resources\Credentials.ps1" />
4 WindowsAzurePowershell/src/Management.ScenarioTest/Properties/AssemblyInfo.cs
View
@@ -41,5 +41,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.6.13")]
-[assembly: AssemblyFileVersion("0.6.13")]
+[assembly: AssemblyVersion("0.6.14")]
+[assembly: AssemblyFileVersion("0.6.14")]
68 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1
View
@@ -37,7 +37,7 @@ Tests Publishing a Cache Service.
#>
function Test-PublishCacheService
{
- PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()}
+ PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()}
}
<#
@@ -46,7 +46,7 @@ Tests Publishing and updating a Cache Service.
#>
function Test-UpdateCacheService
{
- PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()} {Test-RemoteDesktop}
+ PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()} {Test-RemoteDesktop}
}
########################################################################### Remove-AzureService Scenario Tests ###########################################################################
@@ -173,14 +173,11 @@ function Test-StartAzureServiceWithEmptyDeployment
{
# Setup
$name = Get-CloudServiceName
+ $msg = [string]::Format("Deployment for service {0} with Staging slot doesn't exist", $name)
New-AzureService $name -Location $(Get-DefaultLocation)
- Stop-AzureService $name -Slot Staging
# Test
- $started = Start-AzureService $name -Slot Staging -PassThru
-
- # Assert
- Assert-False { $started }
+ Assert-Throws { Start-AzureService $name -Slot Staging } $msg
}
<#
@@ -196,7 +193,7 @@ function Test-StartAzureServiceWithProductionDeployment
Start-Sleep -Second 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping
# Test
- $started = Start-AzureService $name -PassThru
+ $started = Get-AzureService $name | Start-AzureService -PassThru
# Assert
Assert-True { $started }
@@ -209,12 +206,31 @@ Tests Start-AzureService with an existing service that has staging deployment on
function Test-StartAzureServiceWithStagingDeployment
{
# Setup
- New-CloudService 1 $null "Staging"
+ New-CloudService 1 $null Staging
$name = $global:createdCloudServices[0]
- Stop-AzureService $name -Slot "Staging"
+ Stop-AzureService $name -Slot Staging
+ Start-Sleep -Second 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping
+
+ # Test
+ $started = Start-AzureService $name -Slot Staging -PassThru
+
+ # Assert
+ Assert-True { $started }
+}
+
+<#
+.SYNOPSIS
+Tests Start-AzureService works without passing name in cloud service project.
+#>
+function Test-StartAzureServiceWithoutName
+{
+ # Setup
+ New-CloudService 1
+ Stop-AzureService
+ Start-Sleep -Second 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping
# Test
- $started = Start-AzureService $name -PassThru -Slot "Staging"
+ $started = Start-AzureService -PassThru
# Assert
Assert-True { $started }
@@ -254,7 +270,7 @@ function Test-AzureNameWithExistingHostedService
<#
.SYNOPSIS
-Tests Test-AzureName with invalid hosted service name and expects $false
+Tests Test-AzureName with invalid hosted service name and expects $true
#>
function Test-AzureNameWithInvalidHostedService
{
@@ -262,7 +278,7 @@ function Test-AzureNameWithInvalidHostedService
$actual = Test-AzureName -Service "Invalid Name"
# Assert
- Assert-False { $actual }
+ Assert-True { $actual }
}
<#
@@ -368,13 +384,11 @@ function Test-StopAzureServiceWithEmptyDeployment
{
# Setup
$name = Get-CloudServiceName
+ $msg = [string]::Format("Deployment for service {0} with Staging slot doesn't exist", $name)
New-AzureService $name -Location $(Get-DefaultLocation)
# Test
- $Stopped = Stop-AzureService $name -Slot Staging -PassThru
-
- # Assert
- Assert-False { $Stopped }
+ Assert-Throws { Stop-AzureService $name -Slot Staging } $msg
}
<#
@@ -386,10 +400,9 @@ function Test-StopAzureServiceWithProductionDeployment
# Setup
New-CloudService 1
$name = $global:createdCloudServices[0]
- Start-AzureService $name
# Test
- $Stopped = Stop-AzureService $name -PassThru
+ $Stopped = Get-AzureService $name | Stop-AzureService -PassThru
# Assert
Assert-True { $Stopped }
@@ -404,7 +417,6 @@ function Test-StopAzureServiceWithStagingDeployment
# Setup
New-CloudService 1 $null "Staging"
$name = $global:createdCloudServices[0]
- Start-AzureService $name -Slot "Staging"
# Test
$Stopped = Stop-AzureService $name -PassThru -Slot "Staging"
@@ -413,6 +425,22 @@ function Test-StopAzureServiceWithStagingDeployment
Assert-True { $Stopped }
}
+<#
+.SYNOPSIS
+Tests Stop-AzureService works without passing name in cloud service project.
+#>
+function Test-StopAzureServiceWithoutName
+{
+ # Setup
+ New-CloudService 1
+
+ # Test
+ $stopped = Stop-AzureService -PassThru
+
+ # Assert
+ Assert-True { $stopped }
+}
+
########################################################################### Start-AzureEmulator Scenario Tests ###################################################################
<#
110 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/Common.ps1
View
@@ -20,13 +20,13 @@ Gets valid and available cloud service name.
#>
function Get-CloudServiceName
{
- do
- {
- $name = "onesdk" + (Get-Random).ToString()
- $used = Test-AzureName -Service $name
- } while ($used)
+ do
+ {
+ $name = "onesdk" + (Get-Random).ToString()
+ $used = Test-AzureName -Service $name
+ } while ($used)
- return $name
+ return $name
}
<#
@@ -35,7 +35,7 @@ Gets the default location
#>
function Get-DefaultLocation
{
- return (Get-AzureLocation)[0].Name
+ return (Get-AzureLocation)[0].Name
}
<#
@@ -47,7 +47,7 @@ The number of cloud services to create.
#>
function New-CloudService
{
- param([int] $count, [ScriptBlock] $cloudServiceProject, [string] $slot)
+ param([int] $count, [ScriptBlock] $cloudServiceProject, [string] $slot)
if ($cloudServiceProject -eq $null) { $cloudServiceProject = { New-TinyCloudServiceProject $args[0] } }
if ($slot -eq $null) { $slot = "Production" }
@@ -55,7 +55,7 @@ function New-CloudService
1..$count | % {
$name = Get-CloudServiceName;
Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name;
- Publish-AzureServiceProject -Force -Slot $slot
+ Publish-AzureServiceProject -Slot $slot
$global:createdCloudServices += $name;
}
}
@@ -75,24 +75,24 @@ Code block to update the service and verify the correct update
#>
function PublishAndUpdate-CloudService
{
- param([int] $count, [ScriptBlock] $cloudServiceProject, [ScriptBlock] $verifier, [ScriptBlock] $updater)
- if ($cloudServiceProject -eq $null) { $cloudServiceProject = { New-TinyCloudServiceProject $args[0] } }
- if ($verifier -eq $null) {$verifier = {return $true}}
- 1..$count | % {
- $name = Get-CloudServiceName;
- Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name;
- $service = Publish-AzureServiceProject -Force;
- $global:createdCloudServices += $name;
- $worked = Retry-Function $verifier $service 3 30
- Assert-True {$worked -eq $true} "Error verifying first application deployment"
- if ($updater -ne $null)
- {
- Invoke-Command -ScriptBlock $updater
- $service = Publish-AzureServiceProject -Force;
- $worked = Retry-Function $verifier $service 3 30
- Assert-True {$worked -eq $true} "Error verifying application update"
- }
- }
+ param([int] $count, [ScriptBlock] $cloudServiceProject, [ScriptBlock] $verifier, [ScriptBlock] $updater)
+ if ($cloudServiceProject -eq $null) { $cloudServiceProject = { New-TinyCloudServiceProject $args[0] } }
+ if ($verifier -eq $null) {$verifier = {return $true}}
+ 1..$count | % {
+ $name = Get-CloudServiceName;
+ Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name;
+ $service = Publish-AzureServiceProject;
+ $global:createdCloudServices += $name;
+ $worked = Retry-Function $verifier $service 3 30
+ Assert-True {$worked -eq $true} "Error verifying first application deployment"
+ if ($updater -ne $null)
+ {
+ Invoke-Command -ScriptBlock $updater
+ $service = Publish-AzureServiceProject;
+ $worked = Retry-Function $verifier $service 3 30
+ Assert-True {$worked -eq $true} "Error verifying application update"
+ }
+ }
}
<#
@@ -114,10 +114,10 @@ Creates new cloud service project with one node web role.
#>
function New-TinyCloudServiceProject
{
- param([string] $name)
+ param([string] $name)
- New-AzureServiceProject $name
- Add-AzureNodeWebRole
+ New-AzureServiceProject $name
+ Add-AzureNodeWebRole
}
<#
@@ -126,16 +126,18 @@ Creates new cloud service project with a web role connected to a cache.
#>
function New-CacheCloudServiceProject
{
- param([string] $name)
-
- New-AzureServiceProject $name
- Add-AzureNodeWebRole ClientRole
- copy ..\CloudService\Cache\*.js .\ClientRole\
- cd .\ClientRole
- Npm-Install "install ..\..\CloudService\Cache\mc.tgz ..\..\CloudService\Cache\connman.tgz";
- cd ..
- Add-AzureCacheWorkerRole CacheRole
- Enable-AzureMemcacheRole ClientRole CacheRole
+ param([string] $name)
+
+ New-AzureServiceProject $name
+ Add-AzureNodeWebRole ClientRole
+ copy ..\CloudService\Cache\*.js .\ClientRole\
+ cd .\ClientRole
+ Npm-Install "install ..\..\CloudService\Cache\mc.tgz ..\..\CloudService\Cache\connman.tgz";
+ cd ..
+ Add-AzureCacheWorkerRole CacheRole
+ Enable-AzureMemcacheRole ClientRole CacheRole
+ $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
+ Enable-AzureServiceProjectRemoteDesktop "gooduser" -Password $password
}
<#
@@ -148,15 +150,15 @@ The npm command to run
function Npm-Install
{
- param([string] $command)
+ param([string] $command)
$scriptBlock = {
- $toss = Start-Process npm $command -WAIT;
- $modules = Get-Item * | Where-Object Name node_modules -EQ;
+ $toss = Start-Process npm $command -WAIT;
+ $modules = Get-Item * | Where-Object Name node_modules -EQ;
return $modules -ne $null;
}
-
- Retry-Function $scriptBlock $null 3 30
+
+ Retry-Function $scriptBlock $null 3 30
}
<#
@@ -165,12 +167,12 @@ Places and retrieves a key value pair from a cache app
#>
function Verify-CacheApp
{
- param([string]$uri)
- $client = New-Object System.Net.WebClient
- $client.BaseAddress = $uri
- $toss = $client.UploadString("/add", "key=key1&value=value1")
- $check = $client.UploadString("/get", "key=key1")
- return $check.Contains("key1") -and $check.Contains("value1")
+ param([string]$uri)
+ $client = New-Object System.Net.WebClient
+ $client.BaseAddress = $uri
+ $toss = $client.UploadString("/add", "key=key1&value=value1")
+ $check = $client.UploadString("/get", "key=key1")
+ return $check.Contains("key1") -and $check.Contains("value1")
}
<#
@@ -180,7 +182,7 @@ Updates a service definition by adding remote desktop
function Test-RemoteDesktop
{
- $password = New-Object System.Security.SecureString
- foreach ($c in "P@ssw0rd!".ToCharArray()) {$password.AppendChar($c)}
- Enable-AzureServiceProjectRemoteDesktop -Username user1 -Password $password
+ $password = New-Object System.Security.SecureString
+ foreach ($c in "P@ssw0rd!".ToCharArray()) {$password.AppendChar($c)}
+ Enable-AzureServiceProjectRemoteDesktop -Username user1 -Password $password
}
0  ...narioTest/Resources/ServiceManagemenet/Common.ps1 → ...enarioTest/Resources/ServiceManagement/Common.ps1
View
File renamed without changes
0  ...Resources/ServiceManagemenet/VMProvisionTests.ps1 → .../Resources/ServiceManagement/VMProvisionTests.ps1
View
File renamed without changes
92 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Websites/WebsitesTests.ps1
View
@@ -92,13 +92,14 @@ function Test-GetAzureWebsiteLogTail
$uri = "http://" + $website.HostNames[0]
$client.BaseAddress = $uri
$count = 0
+ cd ..
#Test
- Get-AzureWebsiteLog -Tail -Message "㯑䲘䄂㮉" | % {
- if ($_ -like "*㯑䲘䄂㮉*") { cd ..; exit; }
+ Get-AzureWebsiteLog -Name $website.Name -Tail -Message "㯑䲘䄂㮉" | % {
+ if ($_ -like "*㯑䲘䄂㮉*") { exit; }
Retry-DownloadString $client $uri
$count++
- if ($count -gt 50) { cd ..; throw "Logs were not found"; }
+ if ($count -gt 50) { throw "Logs were not found"; }
}
}
@@ -115,13 +116,14 @@ function Test-GetAzureWebsiteLogTailUriEncoding
$uri = "http://" + $website.HostNames[0]
$client.BaseAddress = $uri
$count = 0
+ cd ..
#Test
- Get-AzureWebsiteLog -Tail -Message "mes/a:q;" | % {
- if ($_ -like "*mes/a:q;*") { cd ..; exit; }
+ Get-AzureWebsiteLog -Name $website.Name -Tail -Message "mes/a:q;" | % {
+ if ($_ -like "*mes/a:q;*") { exit; }
Retry-DownloadString $client $uri
$count++
- if ($count -gt 50) { cd ..; throw "Logs were not found"; }
+ if ($count -gt 50) { throw "Logs were not found"; }
}
}
@@ -140,6 +142,7 @@ function Test-GetAzureWebsiteLogTailPath
Set-AzureWebsite -RequestTracingEnabled $true -HttpLoggingEnabled $true -DetailedErrorLoggingEnabled $true
1..10 | % { Retry-DownloadString $client $uri }
Start-Sleep -Seconds 30
+ cd ..
#Test
$retry = $false
@@ -147,10 +150,9 @@ function Test-GetAzureWebsiteLogTailPath
{
try
{
- Get-AzureWebsiteLog -Tail -Path http | % {
+ Get-AzureWebsiteLog -Name $website.Name -Tail -Path http | % {
if ($_ -like "*")
{
- cd ..
exit
}
throw "HTTP path is not reached"
@@ -216,17 +218,35 @@ Tests Get-AzureWebsite
function Test-GetAzureWebsite
{
# Setup
- New-BasicLogWebsite
- $website = $global:currentWebsite
- Set-AzureWebsite $website.Name -AzureDriveTraceEnabled $true
+ $name = Get-WebsiteName
+ New-AzureWebsite $name
+ Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output FileSystem -LogLevel Error
#Test
- $config = Get-AzureWebsite -Name $website.Name
+ $config = Get-AzureWebsite -Name $name
# Assert
Assert-AreEqual $true $config.AzureDriveTraceEnabled
}
+<#
+.SYNOPSIS
+Tests GetAzureWebsite with a stopped site and expects to proceed.
+#>
+function Test-GetAzureWebsiteWithStoppedSite
+{
+ # Setup
+ $name = Get-WebsiteName
+ New-AzureWebsite $name
+ Stop-AzureWebsite $name
+
+ #Test
+ $website = Get-AzureWebsite $name
+
+ # Assert
+ Assert-NotNull { $website }
+}
+
########################################################################### Start-AzureWebsite Scenario Tests ###########################################################################
<#
@@ -286,4 +306,52 @@ function Test-RestartAzureWebsite
# Assert
$website = Get-AzureWebsite $name
Assert-AreEqual "Running" $website.State
+}
+
+########################################################################### Enable-AzureWebsiteDiagnostic Scenario Tests ###########################################################################
+
+<#
+.SYNOPSIS
+Tests Enable-AzureWebsiteDiagnostic with storage table
+#>
+function Test-EnableApplicationDiagnosticOnTableStorage
+{
+ # Setup
+ $name = Get-WebsiteName
+ $storageName = $(Get-WebsiteName).ToLower()
+ $locations = Get-AzureLocation
+ $defaultLocation = $locations[0].Name
+ New-AzureWebsite $name
+ New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation
+
+ # Test
+ Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output StorageTable -LogLevel Warning -StorageAccountName $storageName
+
+ # Assert
+ $website = Get-AzureWebsite $name
+ Assert-True { $website.AzureTableTraceEnabled }
+ Assert-AreEqual Warning $website.AzureTableTraceLevel
+ Assert-NotNull $website.AppSettings["CLOUD_STORAGE_ACCOUNT"]
+
+ # Cleanup
+ Remove-AzureStorageAccount $storageName
+}
+
+<#
+.SYNOPSIS
+Tests Enable-AzureWebsiteDiagnostic with file system
+#>
+function Test-EnableApplicationDiagnosticOnFileSystem
+{
+ # Setup
+ $name = Get-WebsiteName
+ New-AzureWebsite $name
+
+ # Test
+ Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output FileSystem -LogLevel Warning
+
+ # Assert
+ $website = Get-AzureWebsite $name
+ Assert-True { $website.AzureDriveTraceEnabled }
+ Assert-AreEqual Warning $website.AzureDriveTraceLevel
}
3  WindowsAzurePowershell/src/Management.ScenarioTest/ServiceBusTests/ServiceBusNamespaceTests.cs
View
@@ -93,6 +93,7 @@ public void TestGetAzureSBNamespaceWithValidExisitingNamespace()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.ServiceBus)]
+ [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1399
public void TestGetAzureSBNamespaceWithValidNonExisitingNamespace()
{
RunPowerShellTest("Test-GetAzureSBNamespaceWithValidNonExisitingNamespace");
@@ -129,6 +130,7 @@ public void TestNewAzureSBNamespaceWithValidNewNamespace()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.ServiceBus)]
+ [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1400
public void TestNewAzureSBNamespaceWithValidExistingNamespace()
{
RunPowerShellTest("Test-NewAzureSBNamespaceWithValidExistingNamespace");
@@ -174,6 +176,7 @@ public void TestRemoveAzureSBNamespaceWithExistingNamespace()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.ServiceBus)]
+ [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1401
public void TestRemoveAzureSBNamespaceWithNonExistingNamespace()
{
RunPowerShellTest("Test-RemoveAzureSBNamespaceWithNonExistingNamespace");
7 ...st/ServiceManagemenet/VMProvisionScenarioTests.cs → ...est/ServiceManagement/VMProvisionScenarioTests.cs
View
@@ -28,8 +28,8 @@ public class VMProvisionScenarioTests : WindowsAzurePowerShellTest
{
public VMProvisionScenarioTests()
: base("CloudService\\Common.ps1",
- "ServiceManagemenet\\Common.ps1",
- "ServiceManagemenet\\VMProvisionTests.ps1"
+ "ServiceManagement\\Common.ps1",
+ "ServiceManagement\\VMProvisionTests.ps1"
)
{
@@ -39,13 +39,14 @@ public VMProvisionScenarioTests()
[TestCategory(Category.All)]
[TestCategory(Category.ServiceManagement)]
[TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,Get-AzureVM,Get-AzureLocation,Import-AzurePublishSettingsFile,Get-AzureSubscription,Set-AzureSubscription)")]
+ [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1402
public void NewWindowsAzureQuickVM()
{
powershell.Invoke();
ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
- string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "MSFT", "testvmimage" }, false);
+ string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
string locationName = vmPowershellCmdlets.GetAzureLocationName(new[] { Resource.Location }, false);
string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM");
28 WindowsAzurePowershell/src/Management.ScenarioTest/WebsitesTests/WebsitesTests.cs
View
@@ -135,6 +135,14 @@ public void TestGetAzureWebsite()
RunPowerShellTest("Test-GetAzureWebsite");
}
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestGetAzureWebsiteWithStoppedSite()
+ {
+ RunPowerShellTest("Test-GetAzureWebsiteWithStoppedSite");
+ }
+
#endregion
#region Start-AzureWebsite Scenario Tests
@@ -172,5 +180,25 @@ public void TestRestartAzureWebsite()
}
#endregion
+
+ #region Enable-AzureWebsiteDiagnostic Scenario Tests
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestEnableApplicationDiagnosticOnTableStorage()
+ {
+ RunPowerShellTest("Test-EnableApplicationDiagnosticOnTableStorage");
+ }
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestEnableApplicationDiagnosticOnFileSystem()
+ {
+ RunPowerShellTest("Test-EnableApplicationDiagnosticOnFileSystem");
+ }
+
+ #endregion
}
}
23 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs
View
@@ -33,7 +33,9 @@ public class AddAzureVhdSASUriTest : AzureVhdTest
[TestInitialize]
public void Initialize()
{
- if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName))
+ SetTestSettings();
+
+ if (defaultAzureSubscription.Equals(null))
{
Assert.Inconclusive("No Subscription is selected!");
}
@@ -45,10 +47,11 @@ public void Initialize()
// Remove all subscriptions. SAS Uri should work without a subscription.
try
{
- vmPowershellCmdlets.RunPSScript("Get-AzureSubscription | Remove-AzureSubscription");
+ vmPowershellCmdlets.RunPSScript("Get-AzureSubscription | Remove-AzureSubscription -Force");
}
catch
- {
+ {
+ Console.WriteLine("Subscriptions cannot be removed");
}
// Check if all subscriptions are removed.
@@ -57,8 +60,12 @@ public void Initialize()
vmPowershellCmdlets.GetAzureSubscription();
Assert.Fail("Subscription was not removed!");
}
- catch
+ catch (Exception e)
{
+ if(e is AssertFailedException)
+ {
+ throw;
+ }
}
}
@@ -67,6 +74,7 @@ public void Initialize()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\upload_VHD.csv", "upload_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -145,6 +153,7 @@ private string CreateSasUriWithPermission(string vhdName, int p)
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskOverwriteSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -207,6 +216,7 @@ public void UploadDiskOverwriteSasUri()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskOverwriteNonExistSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -269,6 +279,7 @@ public void UploadDiskOverwriteNonExistSasUri()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskSecondWithoutOverwriteSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -332,6 +343,7 @@ public void UploadDiskSecondWithoutOverwriteSasUri()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskThreadNumberSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -392,6 +404,7 @@ public void UploadDiskThreadNumberSasUri()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskThreadNumberOverwriteSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -447,6 +460,7 @@ public void UploadDiskThreadNumberOverwriteSasUri()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void PatchFirstLevelDifferencingDiskSasUri()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -570,6 +584,7 @@ public void PatchSasUriNormalBaseShouldFail()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void PatchNormalSasUriBase()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
5 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs
View
@@ -33,7 +33,9 @@ public class AddAzureVhdTest : AzureVhdTest
[TestInitialize]
public void Initialize()
{
- if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName))
+ SetTestSettings();
+
+ if (defaultAzureSubscription.Equals(null))
{
Assert.Inconclusive("No Subscription is selected!");
}
@@ -213,6 +215,7 @@ public void UploadDiskOverwriteNonExist()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void UploadDiskSecondWithoutOverwrite()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
169 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
View
@@ -0,0 +1,169 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.Specialized;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Text.RegularExpressions;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.Auth;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
+
+ public static class CredentialHelper
+ {
+ private static string EnvironmentPathFormat = "testcredentials-{0}";
+ private static string defaultCredentialFile = "default.publishsettings";
+ private static string TestEnvironmentVariable = "AZURE_TEST_ENVIRONMENT";
+ private static string StorageAccountVariable = "AZURE_STORAGE_ACCOUNT";
+ private static string StorageAccountKeyVariable = "AZURE_STORAGE_ACCESS_KEY";
+ private static string CredentialBlobUriFormat = "https://{0}.blob.core.windows.net";
+ public static string CredentialImportFormat = "Import-AzurePublishSettingsFile '{0}'";
+
+ private static string publishSettingsFile = null;
+ private static string defaultSubscriptionName = null;
+ private static string location = "West US";
+ private static CloudBlobContainer blobContainer;
+
+ private static string downloadDirectoryPath = null;
+ private static Dictionary<string, string> environment = new Dictionary<string, string>();
+ public static Dictionary<string, string> PowerShellVariables { get; private set; }
+
+ public static void GetCredentialInfo(string downloadDirectoryPath)
+ {
+ Process currentProcess = Process.GetCurrentProcess();
+ StringDictionary environment = currentProcess.StartInfo.EnvironmentVariables;
+ Assert.IsTrue(environment.ContainsKey(TestEnvironmentVariable),
+ string.Format("You must define a test environment using environment variable {0}", TestEnvironmentVariable));
+ string testEnvironment = environment[TestEnvironmentVariable];
+ Assert.IsTrue(environment.ContainsKey(StorageAccountVariable),
+ string.Format("You must define a storage account for credential download using environment variable {0}", StorageAccountVariable));
+ string storageAccount = environment[StorageAccountVariable];
+ Assert.IsTrue(environment.ContainsKey(StorageAccountKeyVariable),
+ string.Format("You must define a storage account key for credential download using environment variable {0}", StorageAccountKeyVariable));
+ string storageAccountKey = environment[StorageAccountKeyVariable];
+ DownloadTestCredentials(testEnvironment, downloadDirectoryPath,
+ string.Format(CredentialBlobUriFormat, storageAccount),
+ storageAccount, storageAccountKey);
+
+ publishSettingsFile = Path.Combine(downloadDirectoryPath, defaultCredentialFile);
+ Assert.IsTrue(File.Exists(publishSettingsFile), string.Format("Did not download file {0}", publishSettingsFile));
+ }
+
+ private static void DownloadTestCredentials(string testEnvironment, string downloadDirectoryPath, string blobUri, string storageAccount, string storageKey)
+ {
+ string containerPath = string.Format(EnvironmentPathFormat, testEnvironment);
+ StorageCredentials credentials = new StorageCredentials(storageAccount, storageKey);
+ CloudBlobClient blobClient = new CloudBlobClient(new Uri(blobUri), credentials);
+ blobContainer = blobClient.GetContainerReference(containerPath);
+ foreach (IListBlobItem blobItem in blobContainer.ListBlobs())
+ {
+ ICloudBlob blob = blobClient.GetBlobReferenceFromServer(blobItem.Uri);
+ Console.WriteLine("Downloading file {0} from blob Uri {1}", blob.Name, blob.Uri);
+ FileStream blobStream = new FileStream(Path.Combine(downloadDirectoryPath, blob.Name), FileMode.Create);
+ blob.DownloadToStream(blobStream);
+ blobStream.Flush();
+ blobStream.Close();
+ }
+ }
+
+ public static void GetTestSettings(string testSettings)
+ {
+ switch (testSettings)
+ {
+ case "UseDefaults":
+ default:
+ CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory);
+ break;
+
+ case "UseCustom":
+ if (!string.IsNullOrWhiteSpace(Resource.PublishSettingsFile))
+ {
+ publishSettingsFile = Resource.PublishSettingsFile;
+ }
+ else
+ {
+ Assert.IsNotNull(CredentialHelper.PublishSettingsFile);
+ }
+
+ if (!string.IsNullOrWhiteSpace(Resource.DefaultSubscriptionName))
+ {
+ defaultSubscriptionName = Resource.DefaultSubscriptionName;
+ }
+ break;
+
+ case "UseDefaultsandOverride":
+ CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory);
+
+ if (!string.IsNullOrWhiteSpace(Resource.PublishSettingsFile))
+ {
+ CredentialHelper.PublishSettingsFile = Resource.PublishSettingsFile;
+ }
+ if (!string.IsNullOrWhiteSpace(Resource.DefaultSubscriptionName))
+ {
+ CredentialHelper.DefaultSubscriptionName = Resource.DefaultSubscriptionName;
+ }
+
+ break;
+ }
+
+ if (!string.IsNullOrWhiteSpace(Resource.Location))
+ {
+ location = Resource.Location;
+ }
+ }
+
+ public static string PublishSettingsFile
+ {
+ get
+ {
+ return publishSettingsFile;
+ }
+ set
+ {
+ publishSettingsFile = value;
+ }
+ }
+
+ public static string DefaultSubscriptionName
+ {
+ get
+ {
+ return defaultSubscriptionName;
+ }
+ set
+ {
+ defaultSubscriptionName = value;
+ }
+ }
+
+ public static string Location
+ {
+ get
+ {
+ return location;
+ }
+ set
+ {
+ location = value;
+ }
+ }
+
+ }
+}
127 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
View
@@ -13,11 +13,6 @@
// ----------------------------------------------------------------------------------
-
-
-
-
-
namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests
{
using System;
@@ -38,9 +33,6 @@ namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTes
public class FunctionalTest : ServiceManagementTest
{
bool createOwnService = false;
-
-
-
private static string defaultService;
private static string defaultVm;
private const string vhdBlob = "vhdstore/os.vhd";
@@ -48,13 +40,13 @@ public class FunctionalTest : ServiceManagementTest
private string serviceName;
private string vmName;
protected static string vhdBlobLocation;
-
-
-
+
[ClassInitialize]
public static void ClassInit(TestContext context)
{
- if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName))
+ SetTestSettings();
+
+ if (defaultAzureSubscription.Equals(null))
{
Assert.Inconclusive("No Subscription is selected!");
}
@@ -113,6 +105,7 @@ public void ScriptTestSample()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove)-AzureAffinityGroup)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\affinityGroupData.csv", "affinityGroupData#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void AzureAffinityGroupTest()
{
createOwnService = false;
@@ -197,6 +190,7 @@ private bool AffinityGroupVerify(AffinityGroupContext affContext, string name, s
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Remove)-AzureCertificate)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void AzureCertificateTest()
{
createOwnService = false;
@@ -305,6 +299,7 @@ private void UninstallCert(X509Certificate2 cert, StoreLocation location, StoreN
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureCertificateSetting)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void AzureCertificateSettingTest()
{
createOwnService = true;
@@ -362,6 +357,7 @@ public void AzureCertificateSettingTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureDataDisk)")]
+ [Ignore]
public void AzureDataDiskTest()
{
createOwnService = false;
@@ -466,6 +462,7 @@ private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskCo
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Update,Remove)-AzureDisk)")]
+ [Ignore]
public void AzureDiskTest()
{
createOwnService = false;
@@ -523,6 +520,7 @@ public void AzureDiskTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove,Move)-AzureDeployment)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void AzureDeploymentTest()
{
createOwnService = true;
@@ -620,6 +618,7 @@ public void AzureDeploymentTest()
///
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get)-AzureDns)")]
+ [Ignore]
public void AzureDnsTest()
{
createOwnService = true;
@@ -667,6 +666,7 @@ public void AzureDnsTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureEndpoint)")]
+ [Ignore]
public void AzureEndpointTest()
{
createOwnService = false;
@@ -840,6 +840,7 @@ private bool CheckEndpointRemoved(string vmName, string serviceName, AzureEndPoi
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet Set-AzureAvailabilitySet)")]
+ [Ignore]
public void AzureAvailabilitySetTest()
{
createOwnService = false;
@@ -870,6 +871,7 @@ private void CheckAvailabilitySet(string vmName, string serviceName, string avai
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureLocation)")]
+ [Ignore]
public void AzureLocationTest()
{
createOwnService = false;
@@ -893,6 +895,7 @@ public void AzureLocationTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureOSDisk)")]
+ [Ignore]
public void AzureOSDiskTest()
{
createOwnService = false;
@@ -921,6 +924,7 @@ public void AzureOSDiskTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureOSVersion)")]
+ [Ignore]
public void AzureOSVersionTest()
{
createOwnService = false;
@@ -945,6 +949,7 @@ public void AzureOSVersionTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureRole)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void AzureRoleTest()
{
createOwnService = true;
@@ -1008,6 +1013,7 @@ public void AzureRoleTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureSubnet)")]
+ [Ignore]
public void AzureSubnetTest()
{
createOwnService = true;
@@ -1043,6 +1049,7 @@ public void AzureSubnetTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get)-AzureStorageKey)")]
+ [Ignore]
public void AzureStorageKeyTest()
{
createOwnService = false;
@@ -1072,6 +1079,7 @@ public void AzureStorageKeyTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove)-AzureStorageAccount)")]
+ [Ignore]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\storageAccountTestData.csv", "storageAccountTestData#csv", DataAccessMethod.Sequential)]
public void AzureStorageAccountTest()
{
@@ -1082,11 +1090,19 @@ public void AzureStorageAccountTest()
string locationName1 = Convert.ToString(TestContext.DataRow["Location1"]);
string locationName2 = Convert.ToString(TestContext.DataRow["Location2"]);
string affinityGroupName = Convert.ToString(TestContext.DataRow["AffinityGroupName"]);
- string label1 = Convert.ToString(TestContext.DataRow["Label1"]);
- string label2 = Convert.ToString(TestContext.DataRow["Label2"]);
- string description1 = Convert.ToString(TestContext.DataRow["Description1"]);
- string description2 = Convert.ToString(TestContext.DataRow["Description2"]);
+ string[] label = new string[3] {
+ Convert.ToString(TestContext.DataRow["Label1"]),
+ Convert.ToString(TestContext.DataRow["Label2"]),
+ Convert.ToString(TestContext.DataRow["Label3"])};
+ string[] description = new string[3] {
+ Convert.ToString(TestContext.DataRow["Description1"]),
+ Convert.ToString(TestContext.DataRow["Description2"]),
+ Convert.ToString(TestContext.DataRow["Description3"])};
+ bool?[] geoReplicationSettings = new bool?[3] { true, false, null };
+
+ bool geoReplicationEnabled = true;
+
string[] storageName = new string[2] {
Utilities.GetUniqueShortName(storageAccountPrefix),
Utilities.GetUniqueShortName(storageAccountPrefix)};
@@ -1105,52 +1121,64 @@ public void AzureStorageAccountTest()
if (Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityGroupName))
{
- vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroupName, locationName2, label1, description1);
+ vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroupName, locationName2, label[0], description[0]);
}
vmPowershellCmdlets.NewAzureStorageAccount(storageName[1], null, affinityGroupName, null, null);
Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[1])[0],
storageStaticProperties[1], storageName[1], null, true));
Console.WriteLine("{0} is created", storageName[1]);
-
+
// Set-AzureStorageAccount & Remove-AzureStorageAccount test
- for (int i = 0 ; i < 2 ; i++)
+ for (int i = 0; i < 2; i++)
{
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label1, null, true); // change label with EnableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label1, null, true));
-
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label2, null, false); // change label with DisableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, null, false));
-
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, description1, true); // change description with EnableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, description1, true));
-
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, description2, false); // change description with DisableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, description2, false));
-
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, null, true); // Enable GeoReplication only
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, description2, true));
+ for (int j = 0; j < 3; j++)
+ {
+ vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label[j], null, geoReplicationSettings[j]);
+ if (geoReplicationSettings[j] != null)
+ {
+ geoReplicationEnabled = geoReplicationSettings[j].Value;
+ }
+ Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
+ storageStaticProperties[i], label[j], null, geoReplicationEnabled));
+ }
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, null, false); // Disable GeoReplication only
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, description2, false));
+ for (int j = 0; j < 3; j++)
+ {
+ vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, description[j], geoReplicationSettings[j]);
+ if (geoReplicationSettings[j] != null)
+ {
+ geoReplicationEnabled = geoReplicationSettings[j].Value;
+ }
+ Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
+ storageStaticProperties[i], label[2], description[j], geoReplicationEnabled));
+ }
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label1, description1, true); // Change both label and description with EnableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label1, description1, true));
+ for (int j = 0; j < 3; j++)
+ {
+ vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, null, geoReplicationSettings[j]);
+ if (geoReplicationSettings[j] != null)
+ {
+ geoReplicationEnabled = geoReplicationSettings[j].Value;
+ }
+ Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
+ storageStaticProperties[i], label[2], description[2], geoReplicationEnabled));
+ }
- vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label2, description2, false); // Change both label and description with DisableGeoReplication
- Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
- storageStaticProperties[i], label2, description2, false));
+ for (int j = 0; j < 3; j++)
+ {
+ vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label[j], description[j], geoReplicationSettings[j]);
+ if (geoReplicationSettings[j] != null)
+ {
+ geoReplicationEnabled = geoReplicationSettings[j].Value;
+ }
+ Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0],
+ storageStaticProperties[i], label[j], description[j], geoReplicationEnabled));
+ }
vmPowershellCmdlets.RemoveAzureStorageAccount(storageName[i]);
- Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName[i]), "The storage account was not removed");
+ Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName[i]), "The storage account was not removed");
}
vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityGroupName);
@@ -1218,6 +1246,7 @@ public void AzureStorageAccountTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Save,Update,Remove)-AzureVMImage)")]
+ [Ignore]
public void AzureVMImageTest()
{
@@ -1258,6 +1287,7 @@ public void AzureVMImageTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureVNetConfig)")]
+ [Ignore]
public void AzureVNetConfigTest()
{
createOwnService = false;
@@ -1313,6 +1343,7 @@ public void AzureVNetConfigTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureEndpoint)")]
+ [Ignore]
public void VMSizeTest()
{
9 ...rc/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureSubscriptionCmdletInfo.cs
View
@@ -17,9 +17,8 @@ namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTes
using Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.PowershellCore;
public class RemoveAzureSubscriptionCmdletInfo : CmdletsInfo
- {
-
- public RemoveAzureSubscriptionCmdletInfo(string subscriptionName, string dataFile)
+ {
+ public RemoveAzureSubscriptionCmdletInfo(string subscriptionName, string dataFile, bool force = false)
{
cmdletName = Utilities.RemoveAzureSubscriptionCmdletName;
cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName));
@@ -27,6 +26,10 @@ public RemoveAzureSubscriptionCmdletInfo(string subscriptionName, string dataFil
{
cmdletParams.Add(new CmdletParam("SubscriptionDataFile", dataFile));
}
+ if (force)
+ {
+ cmdletParams.Add(new CmdletParam("Force", force));
+ }
}
}
}
14 ...src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStorageAccountCmdletInfo.cs
View
@@ -18,19 +18,11 @@ namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTes
public class SetAzureStorageAccountCmdletInfo : CmdletsInfo
{
- public SetAzureStorageAccountCmdletInfo(string accountName, string label, string description, bool geoReplication)
+ public SetAzureStorageAccountCmdletInfo(string accountName, string label, string description, bool? geoReplication)
{
cmdletName = Utilities.SetAzureStorageAccountCmdletName;
this.cmdletParams.Add(new CmdletParam("StorageAccountName", accountName));
- if (geoReplication)
- {
- this.cmdletParams.Add(new CmdletParam("EnableGeoReplication"));
- }
- else
- {
- this.cmdletParams.Add(new CmdletParam("DisableGeoReplication"));
- }
if (label != null)
{
this.cmdletParams.Add(new CmdletParam("Label", label));
@@ -39,6 +31,10 @@ public SetAzureStorageAccountCmdletInfo(string accountName, string label, string
{
this.cmdletParams.Add(new CmdletParam("Description", description));
}
+ if (geoReplication != null)
+ {
+ this.cmdletParams.Add(new CmdletParam("GeoReplicationEnabled", geoReplication.Value));
+ }
}
}
}
2  ...ell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs
View
@@ -21,7 +21,6 @@ public class WindowsAzurePowershellCmdlet : PowershellCmdlet
{
private static readonly string[] modules = new[]
{
- Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleCloudService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleManagement),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleServiceManagement)
@@ -44,7 +43,6 @@ private static PowershellModule[] ConstructModules()
return new[]
{
new PowershellModule(Utilities.windowsAzurePowershellModuleManagement, Utilities.windowsAzurePowershellPath),
- new PowershellModule(Utilities.windowsAzurePowershellModuleCloudService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleServiceManagement, Utilities.windowsAzurePowershellPath)
};
2  ...Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdletSequence.cs
View
@@ -22,7 +22,6 @@ internal class WindowsAzurePowershellCmdletSequence : PowershellCmdletSequence
{
private static readonly string[] modules = new[]
{
- Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleCloudService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleManagement),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleServiceManagement)
@@ -49,7 +48,6 @@ private static PowershellModule[] ConstructModules()
return new[]
{
new PowershellModule(Utilities.windowsAzurePowershellModuleManagement, Utilities.windowsAzurePowershellPath),
- new PowershellModule(Utilities.windowsAzurePowershellModuleCloudService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleServiceManagement, Utilities.windowsAzurePowershellPath)
};
2  ...ell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs
View
@@ -22,7 +22,6 @@ public class WindowsAzurePowershellScript : PowershellCmdletScript
{
private static readonly string[] modules = new[]
{
- Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleCloudService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleManagement),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleService),
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellModuleServiceManagement)
@@ -48,7 +47,6 @@ private static PowershellModule[] ConstructModules()
return new[]
{
new PowershellModule(Utilities.windowsAzurePowershellModuleManagement, Utilities.windowsAzurePowershellPath),
- new PowershellModule(Utilities.windowsAzurePowershellModuleCloudService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleService, Utilities.windowsAzurePowershellPath),
new PowershellModule(Utilities.windowsAzurePowershellModuleServiceManagement, Utilities.windowsAzurePowershellPath)
};
9 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs
View
@@ -34,7 +34,9 @@ public class SaveAzureVhdTest : AzureVhdTest
[ClassInitialize]
public static void ClassInit(TestContext context)
{
- if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName))
+ SetTestSettings();
+
+ if (defaultAzureSubscription.Equals(null))
{
Assert.Inconclusive("No Subscription is selected!");
}
@@ -75,6 +77,7 @@ public void Initialize()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void SaveAzureVhdThreadNumberTest()
{
testName = MethodBase.GetCurrentMethod().Name;
@@ -110,6 +113,7 @@ public void SaveAzureVhdThreadNumberTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void SaveAzureVhdStorageKeyTest()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -130,6 +134,7 @@ public void SaveAzureVhdStorageKeyTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void SaveAzureVhdOverwriteTest()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -166,6 +171,7 @@ public void SaveAzureVhdOverwriteTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void SaveAzureVhdAllTest()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -228,6 +234,7 @@ public void SaveAzureVhdResumeTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\wrongPara_VHD.csv", "wrongPara_VHD#csv", DataAccessMethod.Sequential)]
+ [Ignore]
public void SaveAzureVhdWrongParameterTest()
{
114 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs
View
@@ -18,22 +18,20 @@ namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTes
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+ using System.IO;
+ using System.Net;
+ using System.Net.Cache;
+ using System.Reflection;
+ using System.Text;
using System.Threading;
+ using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using Microsoft.WindowsAzure.Management.Service.Gateway;
using Microsoft.WindowsAzure.Management.ServiceManagement.Model;
using Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo;
using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
using Microsoft.WindowsAzure.Management.Utilities.Common;
-
using Microsoft.WindowsAzure.ServiceManagement;
- using System.Reflection;
- using System.Net;
- using System.Net.Cache;
- using System.IO;
- using System.Text;
-
- using System.Xml.Linq;
- using Microsoft.WindowsAzure.Management.Service.Gateway;
[TestClass]
public class ScenarioTest : ServiceManagementTest
@@ -44,20 +42,22 @@ public class ScenarioTest : ServiceManagementTest
[TestInitialize]
public void Initialize()
{
- if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName))
- {
- Assert.Inconclusive("No Subscription is selected!");
- }
+ SetTestSettings();
serviceName = Utilities.GetUniqueShortName(serviceNamePrefix);
pass = false;
testStartTime = DateTime.Now;
}
- [TestMethod(), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,Get-AzureVM,Get-AzureLocation,Import-AzurePublishSettingsFile,Get-AzureSubscription,Set-AzureSubscription)")]
+ /// <summary>
+ /// </summary>
+ [TestMethod(), TestCategory("BVT"), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,Get-AzureVM,Get-AzureLocation,Import-AzurePublishSettingsFile,Get-AzureSubscription,Set-AzureSubscription)")]
public void NewWindowsAzureQuickVM()
- {
+ {
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix);
+
+ if(string.IsNullOrEmpty(imageName))
+ imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName);
@@ -67,14 +67,15 @@ public void NewWindowsAzureQuickVM()
// Cleanup
vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName);
-
Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName));
pass = true;
}
- // Basic Provisioning a Virtual Machine
- [TestMethod(), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (Get-AzureLocation,Test-AzureName ,Get-AzureVMImage,New-AzureQuickVM,Get-AzureVM ,Restart-AzureVM,Stop-AzureVM , Start-AzureVM)")]
+ /// <summary>
+ /// Basic Provisioning a Virtual Machine
+ /// </summary>
+ [TestMethod(), TestCategory("BVT"), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (Get-AzureLocation,Test-AzureName ,Get-AzureVMImage,New-AzureQuickVM,Get-AzureVM ,Restart-AzureVM,Stop-AzureVM , Start-AzureVM)")]
public void ProvisionLinuxVM()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -108,8 +109,7 @@ public void ProvisionLinuxVM()
* */
// Cleanup
- vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName);
-
+ vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName);
Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName));
//TODO: Need to do proper cleanup of the service
@@ -119,14 +119,18 @@ public void ProvisionLinuxVM()
pass = true;
}
- //Verify Advanced Provisioning
- [TestMethod(), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureService,New-AzureVMConfig,Add-AzureProvisioningConfig ,Add-AzureDataDisk ,Add-AzureEndpoint,New-AzureVM)")]
+ /// <summary>
+ /// Verify Advanced Provisioning
+ /// </summary>
+ [TestMethod(), TestCategory("BVT"), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureService,New-AzureVMConfig,Add-AzureProvisioningConfig ,Add-AzureDataDisk ,Add-AzureEndpoint,New-AzureVM)")]
public void AdvancedProvisioning()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix);
string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix);
+ if (string.IsNullOrEmpty(imageName))
+ imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName);
@@ -163,6 +167,8 @@ public void ModifyingVM()
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix);
+ if (string.IsNullOrEmpty(imageName))
+ imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName);
@@ -186,13 +192,18 @@ public void ModifyingVM()
pass = true;
}
- // Changes that Require a Reboot
+ /// <summary>
+ /// Changes that Require a Reboot
+ /// </summary>
[TestMethod(), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (Get-AzureVM,Set-AzureDataDisk ,Update-AzureVM,Set-AzureVMSize)")]
public void UpdateAndReboot()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
- string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM");
+ string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM");
+ if (string.IsNullOrEmpty(imageName))
+ imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
+
vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName);
AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0);
@@ -209,19 +220,22 @@ public void UpdateAndReboot()
vmPowershellCmdlets.SetVMSize(newAzureQuickVMName, serviceName, vmSizeConfig);
// Cleanup
- vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName);
-
+ vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName);
Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName));
pass = true;
}
+ /// <summary>
+ /// </summary>