Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #585 from WindowsAzure/dev

Release 0.6.7
  • Loading branch information...
commit 62a19084f1a010d21aac93444141cac708a1aff3 2 parents a31d4d6 + 946f263
@andrerod andrerod authored
Showing with 26,824 additions and 6,601 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  ChangeLog.txt
  3. +2 −2 WindowsAzurePowershell/setup/azurecmd.wxs
  4. +196 −616 WindowsAzurePowershell/setup/azurecmdfiles.wxi
  5. +810 −181 WindowsAzurePowershell/setup/media/License.rtf
  6. +109 −14 WindowsAzurePowershell/setup/toolsproductlist_webpi_nodejs_entries.xml
  7. +4 −4 WindowsAzurePowershell/src/Management.CloudService.Test/Management.CloudService.Test.csproj
  8. +2 −2 WindowsAzurePowershell/src/Management.CloudService.Test/Model/RemoveAzurePublishSettings.cs
  9. +1 −2  WindowsAzurePowershell/src/Management.CloudService.Test/Properties/AssemblyInfo.cs
  10. +3 −7 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/AzureServiceWrapper.cs
  11. +11 −11 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/Data.cs
  12. +3 −3 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/ServiceSettingsTestData.cs
  13. +6 −10 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/AzureTools/CsPackTests.cs
  14. +3 −4 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/AzureTools/CsRunTests.cs
  15. +58 −0 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/AddAzureCacheWorkerRoleTests.cs
  16. +8 −12 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/CmdletBaseTests.cs
  17. +11 −11 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/DisableAzureRemoteDesktopCommandTest.cs
  18. +217 −0 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/EnableAzureMemcacheRoleTests.cs
  19. +13 −13 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/EnableAzureRemoteDesktopCommandTest.cs
  20. +5 −10 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/NewAzureServiceTests.cs
  21. +80 −26 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/PublishAzureServiceCommandTests.cs
  22. +10 −14 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/RemoveAzureServiceTests.cs
  23. +8 −8 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/SetAzureServiceProjectTests.cs
  24. +9 −7 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/StartAzureServiceTests.cs
  25. +9 −7 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/StopAzureServiceTests.cs
  26. +10 −10 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/AzureServiceTests.cs
  27. +12 −13 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/DeploymentSettingsTests.cs
  28. +11 −9 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/DeploymentStatusManagerTests.cs
  29. +12 −12 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServiceComponentsTests.cs
  30. +9 −9 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServicePathInfoTests.cs
  31. +29 −9 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServiceSettingsTests.cs
  32. +7 −7 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Node/Cmdlet/AddAzureNodeWebRoleTests.cs
  33. +7 −7 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Node/Cmdlet/AddAzureNodeWorkerRoleTests.cs
  34. +11 −11 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Python/Cmdlet/AddAzurePythonWebRoleTests.cs
  35. +4 −4 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Scaffolding/ScaffoldTests.cs
  36. +50 −13 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/AzureAssert.cs
  37. +3 −6 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/FakeWriter.cs
  38. +9 −11 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/FileSystemHelper.cs
  39. +4 −4 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/RuntimePackageHelper.cs
  40. +553 −94 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/SimpleServiceManagement.cs
  41. +3 −4 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/TestBase.cs
  42. +46 −10 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/Testing.cs
  43. +12 −2 WindowsAzurePowershell/src/Management.CloudService/AzureTools/AzureTool.cs
  44. +8 −8 WindowsAzurePowershell/src/Management.CloudService/AzureTools/CsEncrypt.cs
  45. +11 −11 WindowsAzurePowershell/src/Management.CloudService/AzureTools/CsPack.cs
  46. +9 −9 WindowsAzurePowershell/src/Management.CloudService/AzureTools/CsRun.cs
  47. +131 −0 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/AddAzureCacheWorkerRole.cs
  48. +40 −0 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/Common/CloudCmdlet.cs
  49. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/DisableAzureRemoteDesktop.cs
  50. +287 −0 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/EnableAzureMemcacheRole.cs
  51. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/EnableAzureRemoteDesktop.cs
  52. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/GetAzureServiceProjectRoleRuntime.cs
  53. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/NewAzureServiceProject.cs
  54. +63 −50 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/PublishAzureServiceProject.cs
  55. +6 −5 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/RemoveAzureService.cs
  56. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/SetAzureServiceProjectRole.cs
  57. +5 −2 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/StartAzureEmulator.cs
  58. +3 −2 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/StartAzureService.cs
  59. +3 −1 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/StopAzureEmulator.cs
  60. +3 −2 WindowsAzurePowershell/src/Management.CloudService/Cmdlet/StopAzureService.cs
  61. +58 −76 WindowsAzurePowershell/src/Management.CloudService/Management.CloudService.csproj
  62. +1,471 −1,077 WindowsAzurePowershell/src/Management.CloudService/Microsoft.WindowsAzure.Management.CloudService.dll-Help.xml
  63. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Microsoft.WindowsAzure.Management.CloudServiceSnapIn.cs
  64. +6 −4 WindowsAzurePowershell/src/Management.CloudService/Model/AddRole.cs
  65. +19 −3 WindowsAzurePowershell/src/Management.CloudService/Model/AzureService.cs
  66. +50 −0 WindowsAzurePowershell/src/Management.CloudService/Model/CachingStorageConnectionStringUpdater.cs
  67. +78 −8 WindowsAzurePowershell/src/Management.CloudService/Model/CloudRuntime.cs
  68. +8 −5 WindowsAzurePowershell/src/Management.CloudService/Model/Constants.cs
  69. +5 −5 WindowsAzurePowershell/src/Management.CloudService/Model/DeploymentSettings.cs
  70. +5 −4 WindowsAzurePowershell/src/Management.CloudService/Model/DeploymentStatusManager.cs
  71. +6 −6 WindowsAzurePowershell/src/Management.CloudService/Model/GetDeploymentStatus.cs
  72. +23 −0 WindowsAzurePowershell/src/Management.CloudService/Model/IPublishListener.cs
  73. +5 −7 WindowsAzurePowershell/src/Management.CloudService/Model/RemoveAzureDeployment.cs
  74. +5 −13 WindowsAzurePowershell/src/Management.CloudService/Model/RoleInfo.cs
  75. +122 −17 WindowsAzurePowershell/src/Management.CloudService/Model/ServiceComponents.cs
  76. +5 −9 WindowsAzurePowershell/src/Management.CloudService/Model/ServicePathInfo.cs
  77. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Model/ServiceSettings.cs
  78. +7 −11 WindowsAzurePowershell/src/Management.CloudService/Model/SetSettings.cs
  79. +3 −5 WindowsAzurePowershell/src/Management.CloudService/Model/WebRoleInfo.cs
  80. +3 −15 WindowsAzurePowershell/src/Management.CloudService/Model/WorkerRoleInfo.cs
  81. +9 −3 WindowsAzurePowershell/src/Management.CloudService/Node/Cmdlet/AddAzureNodeWorkerRole.cs
  82. +2 −2 WindowsAzurePowershell/src/Management.CloudService/Properties/AssemblyInfo.cs
  83. +288 −19 WindowsAzurePowershell/src/Management.CloudService/Properties/Resources.Designer.cs
  84. +107 −11 WindowsAzurePowershell/src/Management.CloudService/Properties/Resources.resx
  85. +2 −2 WindowsAzurePowershell/src/Management.CloudService/Python/Cmdlet/AddAzureDjangoWebRole.cs
  86. +3 −0  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Cache/WebRole/Scaffold.xml
  87. +5 −0 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd
  88. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Node/WebRole/Web.config
  89. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Node/WebRole/WebRole.xml
  90. +5 −0 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Node/WebRole/bin/setup_web.cmd
  91. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Node/WebRole/web.cloud.config
  92. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Node/WorkerRole/WorkerRole.xml
  93. +10 −3 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WebRole/WebRole.xml
  94. +55 −26 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WebRole/bin/download.ps1
  95. +7 −1 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WebRole/bin/setup_web.cmd
  96. +0 −9 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WebRole/web.cloud.config
  97. +2 −5 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WorkerRole/Scaffold.xml
  98. +10 −3 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WorkerRole/WorkerRole.xml
  99. +55 −26 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WorkerRole/download.ps1
  100. +3 −2 WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/PHP/WorkerRole/setup_worker.cmd
  101. +13 −0 ...rc/Management.CloudService/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.config
  102. +1 −0  WindowsAzurePowershell/src/Management.CloudService/Resources/Scaffolding/Python/WebRole/Scaffold.xml
  103. +6 −9 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/NodeRules.cs
  104. +6 −9 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/PHPRules.cs
  105. +6 −9 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/PythonRules.cs
  106. +10 −11 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/Scaffold.cs
  107. +2 −5 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/ScaffoldFile.cs
  108. +0 −5 WindowsAzurePowershell/src/Management.CloudService/Scaffolding/ScaffoldParams.cs
  109. +0 −102 WindowsAzurePowershell/src/Management.CloudService/Services/AffinityGroup.cs
  110. +24 −51 WindowsAzurePowershell/src/Management.CloudService/Services/AzureBlob.cs
  111. +0 −111 WindowsAzurePowershell/src/Management.CloudService/Services/Certificates.cs
  112. +0 −203 WindowsAzurePowershell/src/Management.CloudService/Services/CloudCmdlet.cs
  113. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Services/CmdLetExtensions.cs
  114. +0 −88 WindowsAzurePowershell/src/Management.CloudService/Services/Constants.cs
  115. +0 −577 WindowsAzurePowershell/src/Management.CloudService/Services/Deployment.cs
  116. +0 −161 WindowsAzurePowershell/src/Management.CloudService/Services/DeploymentInfoContext.cs
  117. +0 −56 WindowsAzurePowershell/src/Management.CloudService/Services/DeploymentServiceManagementCmdletBase.cs
  118. +0 −301 WindowsAzurePowershell/src/Management.CloudService/Services/HostedServices.cs
  119. +1 −1  WindowsAzurePowershell/src/Management.CloudService/Services/InnerDataServiceException.cs
  120. +0 −147 WindowsAzurePowershell/src/Management.CloudService/Services/OperatingSystem.cs
  121. +0 −62 WindowsAzurePowershell/src/Management.CloudService/Services/OperationTracking.cs
  122. +0 −109 WindowsAzurePowershell/src/Management.CloudService/Services/RoleConfiguration.cs
  123. +0 −58 WindowsAzurePowershell/src/Management.CloudService/Services/ServiceManagementError.cs
  124. +0 −265 WindowsAzurePowershell/src/Management.CloudService/Services/ServiceManagementHelper.cs
  125. +0 −117 WindowsAzurePowershell/src/Management.CloudService/Services/StorageService1.cs
  126. +0 −161 WindowsAzurePowershell/src/Management.CloudService/Services/StorageService2.cs
  127. +4 −2 WindowsAzurePowershell/src/Management.CloudService/Services/Utility.cs
  128. +69 −11 WindowsAzurePowershell/src/Management.CloudService/Utilities/General.cs
  129. +3 −7 WindowsAzurePowershell/src/Management.CloudService/Utilities/ProcessHelper.cs
  130. +9 −9 WindowsAzurePowershell/src/Management.CloudService/Utilities/Validate.cs
  131. +0 −2  WindowsAzurePowershell/src/Management.CloudService/XmlSchema/PublishProfile.cs
  132. +304 −16 WindowsAzurePowershell/src/Management.CloudService/XmlSchema/ServiceConfigurationSchema.cs
  133. +576 −237 WindowsAzurePowershell/src/Management.CloudService/XmlSchema/ServiceDefinitionSchema.cs
  134. +127 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/FunctionalTests/DatabaseTest.cs
  135. +47 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/FunctionalTests/OutputFormatValidator.cs
  136. +25 −41 ...owsAzurePowershell/src/Management.SqlDatabase.Test/FunctionalTests/{FunctionalTest.cs → ServerTest.cs}
  137. +33 −8 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Management.SqlDatabase.Test.csproj
  138. +1 −2  WindowsAzurePowershell/src/Management.SqlDatabase.Test/Properties/AssemblyInfo.cs
  139. +3,046 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Resources/MockSessions.xml
  140. +3 −0  WindowsAzurePowershell/src/Management.SqlDatabase.Test/Resources/SqlDatabaseSettings.xml
  141. +163 −23 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/CommonFunctions.ps1
  142. +104 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase.ps1
  143. +75 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/CreateContext.ps1
  144. +75 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/DeleteDatabase.ps1
  145. +29 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/ExpectedFormat.txt
  146. +102 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/FormatValidation.ps1
  147. +102 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/UpdateDatabase.ps1
  148. +2 −1  WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/{ → Server}/CreateGetDeleteServer.ps1
  149. +2 −1  WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/{ → Server}/CreateGetDropFirewall.ps1
  150. +47 −47 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/{ → Server}/ExpectedFormat.txt
  151. +7 −4 WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/{ → Server}/FormatValidation.ps1
  152. +2 −1  WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/{ → Server}/ResetPassword.ps1
  153. +90 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/AsyncExceptionManager.cs
  154. +74 −0 ...AzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCmdletAttributionTests.cs
  155. +193 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseTestHelper.cs
  156. +284 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs
  157. +298 −0 ...wershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs
  158. +217 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs
  159. +111 −0 ...owsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs
  160. +186 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs
  161. +33 −96 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/ExceptionHandlerTests.cs
  162. +14 −15 ...AzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletAttributionTests.cs
  163. +19 −20 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletTests.cs
  164. +200 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/MockServer/HttpMessage.cs
  165. +133 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/MockServer/HttpMessageCollection.cs
  166. +55 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/MockServer/HttpSession.cs
  167. +117 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/MockServer/HttpSessionCollection.cs
  168. +560 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
  169. +15 −16 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletAttributionTests.cs
  170. +21 −21 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs
  171. +7 −7 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/SimpleSqlDatabaseManagement.cs
  172. +201 −0 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/UnitTestHelper.cs
  173. +0 −61 WindowsAzurePowershell/src/Management.SqlDatabase.Test/UnitTests/UnitTestHelpers.cs
  174. +3 −2 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Utilities/PSScriptExecutor.cs
  175. +97 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs
  176. +113 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs
  177. +267 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
  178. +117 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs
  179. +156 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs
  180. +5 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Firewall/Cmdlet/GetAzureSqlDatabaseServerFirewallRule.cs
  181. +5 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Firewall/Cmdlet/NewAzureSqlDatabaseServerFirewallRule.cs
  182. +5 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Firewall/Cmdlet/RemoveAzureSqlDatabaseServerFirewallRule.cs
  183. +5 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Firewall/Cmdlet/SetAzureSqlDatabaseServerFirewallRule.cs
  184. +36 −8 WindowsAzurePowershell/src/Management.SqlDatabase/Management.SqlDatabase.csproj
  185. +40 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Microsoft.WindowsAzure.Management.SqlDatabase.Types.ps1xml
  186. +1,673 −281 WindowsAzurePowershell/src/Management.SqlDatabase/Microsoft.WindowsAzure.Management.SqlDatabase.dll-Help.xml
  187. +1 −1  WindowsAzurePowershell/src/Management.SqlDatabase/Model/SqlDatabaseServerOperationContext.cs
  188. +1 −1  WindowsAzurePowershell/src/Management.SqlDatabase/Properties/AssemblyInfo.cs
  189. +144 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Properties/Resources.Designer.cs
  190. +80 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Properties/Resources.resx
  191. +5 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServer.cs
  192. +7 −6 WindowsAzurePowershell/src/Management.SqlDatabase/Server/Cmdlet/NewAzureSqlDatabaseServer.cs
  193. +7 −6 WindowsAzurePowershell/src/Management.SqlDatabase/Server/Cmdlet/RemoveAzureSqlDatabaseServer.cs
  194. +8 −7 WindowsAzurePowershell/src/Management.SqlDatabase/Server/Cmdlet/SetAzureSqlDatabaseServer.cs
  195. +0 −1  WindowsAzurePowershell/src/Management.SqlDatabase/Services/ClientOutputMessageInspector.cs
  196. +87 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/AccessTokenResult.cs
  197. +186 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataConnectionUtility.cs
  198. +132 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataServiceAccess.cs
  199. +103 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataServiceBasicCredentials.cs
  200. +120 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataServiceConnectionType.cs
  201. +73 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataServiceConstants.cs
  202. +60 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/DataServiceExtensions.cs
  203. +313 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/ManagementServiceExceptionInfo.cs
  204. +326 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Common/SqlDatabaseExceptionHandler.cs
  205. +35 −35 WindowsAzurePowershell/src/Management.SqlDatabase/Services/ConfigurationConstants.cs
  206. +1 −0  WindowsAzurePowershell/src/Management.SqlDatabase/Services/Constants.cs
  207. +16 −26 ....CloudService/Services/RoleInstance.cs → Management.SqlDatabase/Services/Server/DatabaseExtensions.cs}
  208. +90 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/IServerDataServiceContext.cs
  209. +3,279 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerContextInternal.cs
  210. +109 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerDataService.cs
  211. +249 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerDataService.csdl
  212. +38 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerDataServiceEnums.cs
  213. +505 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerDataServiceSqlAuth.cs
  214. +73 −0 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/UpdateServerDataServiceMetadata.ps1
  215. +10 −6 WindowsAzurePowershell/src/Management.SqlDatabase/Services/ServiceResourceError.cs
  216. +10 −6 WindowsAzurePowershell/src/Management.SqlDatabase/Services/SqlDatabaseManagementError.cs
  217. +0 −85 WindowsAzurePowershell/src/Management.SqlDatabase/Services/SqlDatabaseManagementHelper.cs
  218. +7 −63 WindowsAzurePowershell/src/Management.SqlDatabase/SqlDatabaseManagementCmdletBase.cs
  219. +3 −0  WindowsAzurePowershell/src/Management.Test/Management.Test.csproj
  220. +1 −2  WindowsAzurePowershell/src/Management.Test/Properties/AssemblyInfo.cs
  221. +2 −1  WindowsAzurePowershell/src/Management.Test/Resources/Azure.publishsettings
  222. +10 −8 WindowsAzurePowershell/src/Management.Test/TestData/Data.cs
  223. +4 −3 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/GetAzurePublishSettingsTests.cs
  224. +10 −11 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/GetSubscriptionTest.cs
  225. +18 −9 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/ImportAzurePublishSettingsTest.cs
  226. +25 −3 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/RemoveSubscriptionTest.cs
  227. +3 −3 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/SelectSubscriptionTest.cs
  228. +10 −12 WindowsAzurePowershell/src/Management.Test/Tests/Cmdlets/SetSubscriptionTest.cs
  229. +1 −1  WindowsAzurePowershell/src/Management.Test/Tests/Extensions/CmdletExtensionsTest.cs
  230. +10 −11 WindowsAzurePowershell/src/Management.Test/Tests/Extensions/CmdletSubscriptionExtensionsTest.cs
  231. +100 −0 WindowsAzurePowershell/src/Management.Test/Tests/GeneralTest.cs
  232. +14 −14 WindowsAzurePowershell/src/Management.Test/Tests/Services/GlobalComponentsTests.cs
  233. +1 −1  WindowsAzurePowershell/src/Management.Test/Tests/Services/GlobalPathInfoTest.cs
  234. +12 −13 WindowsAzurePowershell/src/Management.Test/Tests/Services/SubscriptionsManagerTests.cs
  235. +1 −1  WindowsAzurePowershell/src/Management.Test/Tests/Utilities/AzureAssert.cs
  236. +6 −5 ...ll/src/{Management.SqlDatabase.Test/UnitTests → Management.Test/Tests/Utilities}/MockCommandRuntime.cs
  237. +78 −0 WindowsAzurePowershell/src/Management.Test/Tests/Utilities/SimpleServiceManagementAsyncResult.cs
  238. BIN  WindowsAzurePowershell/src/Management.WebSites.Test/MSSharedLibKey.snk
  239. +162 −0 WindowsAzurePowershell/src/Management.WebSites.Test/Management.WebSites.Test.csproj
  240. +47 −0 WindowsAzurePowershell/src/Management.WebSites.Test/Properties/AssemblyInfo.cs
  241. +131 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/GetAzureWebSiteTests.cs
  242. +141 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/GetAzureWebsiteDeploymentTests.cs
  243. +60 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/GetAzureWebsiteLocationTests.cs
  244. +80 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/NewAzureWebSiteTests.cs
  245. +94 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/RemoveAzureWebSiteTests.cs
  246. +80 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/RestartAzureWebsiteTests.cs
  247. +122 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/RestoreAzureWebsiteDeploymentTests.cs
  248. +84 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/SaveAzureWebsiteLogTests.cs
  249. +110 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/SetAzureWebSiteTests.cs
  250. +51 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/ShowAzurePortalTests.cs
  251. +80 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/ShowAzureWebsiteTests.cs
  252. +76 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/StartAzureWebSiteTests.cs
  253. +76 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Cmdlets/StopAzureWebSiteTests.cs
  254. +151 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Services/CacheTests.cs
  255. +39 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Services/GitTests.cs
  256. +279 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Services/GithubClientTests.cs
  257. +208 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Utilities/SimpleDeploymentServiceManagement.cs
  258. +304 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Utilities/SimpleGithubManagement.cs
  259. +503 −0 WindowsAzurePowershell/src/Management.WebSites.Test/UnitTests/Utilities/SimpleWebsitesManagement.cs
  260. +86 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/Common/DeploymentBaseCmdlet.cs
  261. +28 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/Common/IGithubCmdlet.cs
  262. +52 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/Common/WebsiteContextBaseCmdlet.cs
  263. +117 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/Common/WebsitesBaseCmdlet.cs
  264. +115 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/GetAzureWebSite.cs
  265. +120 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/GetAzureWebsiteDeployment.cs
  266. +53 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/GetAzureWebsiteLocation.cs
  267. +355 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/NewAzureWebSite.cs
  268. +86 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/RemoveAzureWebSite.cs
  269. +98 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/RestartAzureWebsite.cs
  270. +89 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/RestoreAzureWebsiteDeployment.cs
  271. +102 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/SaveAzureWebsiteLog.cs
  272. +240 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/SetAzureWebsite.cs
  273. +79 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/ShowAzurePortal.cs
  274. +67 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/ShowAzureWebsite.cs
  275. +92 −0 WindowsAzurePowershell/src/Management.WebSites/Cmdlets/StartAzureWebSite.cs
Sorry, we could not display the entire diff because too many files (392) changed.
View
1  .gitignore
@@ -8,5 +8,6 @@ TestResults
*.user
*.suo
*.orig
+*.ncrunchsolution
/Publish
/Package
View
3  ChangeLog.txt
@@ -1,3 +1,6 @@
+2012.10.08 Version 0.6.5
+ * Adding websites cmdlets
+
2012.06.06 Version 0.6.0
* Adding Powershell management cmdlets
* Adding PHP Cmdlets
View
4 WindowsAzurePowershell/setup/azurecmd.wxs
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?define productName="Windows Azure PowerShell - August 2012" ?>
+ <?define productName="Windows Azure PowerShell - October 2012" ?>
<?define sourceDir="$(var.SolutionDir)..\..\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
- <?define version="0.6.2" ?>
+ <?define version="0.6.7" ?>
<?define azureSdkVersion="1.7" ?>
<?define versionedStartMenuFolder="Windows Azure" ?>
View
812 WindowsAzurePowershell/setup/azurecmdfiles.wxi
196 additions, 616 deletions not shown
View
991 WindowsAzurePowershell/setup/media/License.rtf
810 additions, 181 deletions not shown
View
123 WindowsAzurePowershell/setup/toolsproductlist_webpi_nodejs_entries.xml
@@ -3,10 +3,10 @@
<!-- Start Windows Azure SDK for Node, PHP, and Python -->
<entry>
<productId>AzureNodeSDK</productId>
- <title resourceName="Entry_AzureNodeSDK_Title">Windows Azure SDK for Node.js - July 2012</title>
- <version>0.6.1</version>
+ <title resourceName="Entry_AzureNodeSDK_Title">Windows Azure SDK for Node.js - August 2012</title>
+ <version>0.6.2</version>
<published>2012-07-02T12:00:00Z</published>
- <updated>2012-07-02T12:00:00Z</updated>
+ <updated>2012-08-06T12:00:00Z</updated>
<summary resourceName="Entry_AzureNodeSDK_Summary">The Windows Azure SDK for Node.js provides developers with Tools and APIs for building and deploying Node.js applications to Windows Azure.</summary>
<longSummary resourceName="Entry_AzureNodeSDK_LongSummary">Windows Azure SDK for Node.js provides developers with client libraries, PowerShell commandlets and other tools for building and deploying Node.js applications to Windows Azure.</longSummary>
<link href="http://www.windowsazure.com/en-us/develop/nodejs" />
@@ -24,19 +24,20 @@
<discoveryHint>
<and>
<discoveryHint idref="DH_iisnode_if_iis7_exists"/>
+ <discoveryHint idref="DH_iisnodedev_exists" />
<discoveryHint idref="DH_AzurePowerShell"/>
<discoveryHint>
<or>
<discoveryHint>
<file>
<filePath>%programfiles%\nodejs\node.exe</filePath>
- <minimumVersion>0.6.17</minimumVersion>
+ <minimumVersion>0.6.20</minimumVersion>
</file>
</discoveryHint>
<discoveryHint>
<file>
<filePath>%programfiles(x86)%\nodejs\node.exe</filePath>
- <minimumVersion>0.6.17</minimumVersion>
+ <minimumVersion>0.6.20</minimumVersion>
</file>
</discoveryHint>
</or>
@@ -60,6 +61,9 @@
<dependency>
<productId>iisnode_if_iis7_exists</productId>
</dependency>
+ <dependency>
+ <productId>iisnodedev</productId>
+ </dependency>
</and>
</dependency>
<installers>
@@ -81,10 +85,10 @@
<entry>
<productId>AzurePHPSDK</productId>
- <title resourceName="Entry_AzurePHPSDK_Title">Windows Azure SDK for PHP - July 2012</title>
- <version>1.0.1</version>
+ <title resourceName="Entry_AzurePHPSDK_Title">Windows Azure SDK for PHP - August 2012</title>
+ <version>1.0.2</version>
<published>2012-07-02T12:00:00Z</published>
- <updated>2012-07-02T12:00:00Z</updated>
+ <updated>2012-08-06T12:00:00Z</updated>
<summary resourceName="Entry_AzurePHPSDK_Summary">The Windows Azure SDK for PHP provides developers with Tools and APIs for building and deploying PHP applications to Windows Azure.</summary>
<longSummary resourceName="Entry_AzurePHPSDK_LongSummary">The Windows Azure SDK for PHP provides developers with client libraries, PowerShell commandlets and other tools for building and deploying PHP applications to Windows Azure.</longSummary>
<link href="http://www.windowsazure.com/en-us/develop/php" />
@@ -158,12 +162,13 @@
</installers>
</entry>
+
<entry>
<productId>WindowsAzurePowershell</productId>
<title resourceName="Entry_AzurePowerShell_Title">Windows Azure PowerShell</title>
- <version>0.6.1</version>
+ <version>0.6.2</version>
<published>2012-07-02T12:00:00Z</published>
- <updated>2012-07-02T12:00:00Z</updated>
+ <updated>2012-08-06T12:00:00Z</updated>
<summary resourceName="Entry_AzurePowershell_Summary">The Windows Azure PowerShell provides developers and IT/Pros with Windows PowerShell cmdlets for building, deploying and managing Windows Azure services.</summary>
<longSummary resourceName="Entry_AzurePowershell_LongSummary">The Windows Azure PowerShell provides developers and IT/Pros with Windows PowerShell cmdlets for building, deploying and managing Windows Azure services.</longSummary>
<link href="http://www.windowsazure.com/en-us/develop/nodejs" />
@@ -197,7 +202,7 @@
<installerFile>
<fileSize>7408</fileSize>
<trackingURL>http://www.microsoft.com/web/handlers/webpi.ashx?command=incrementproddownloadcount&amp;prodid=AzureNodePowershell</trackingURL>
- <installerURL>http://github.com/downloads/WindowsAzure/azure-sdk-tools/windowsazure-powershell.0.6.1.msi</installerURL>
+ <installerURL>http://github.com/downloads/WindowsAzure/azure-sdk-tools/windowsazure-powershell.0.6.2.msi</installerURL>
</installerFile>
<installCommands>
<msiInstall>
@@ -282,6 +287,78 @@
</installers>
</entry>
+ <!-- iisnode which will install both x86 and x64 binaries on the machine, but will not perform any registration with
+ IIS or IIS Express -->
+ <entry>
+ <productId>iisnodedev</productId>
+ <title resourceName="Entry_iisnodedev_Title">IISNode Developer Version</title>
+ <version>0.1.21</version>
+ <summary resourceName="Entry_iisnodedev_Summary">Host node.js applications side by side with other application types in IIS 7.x.</summary>
+ <longSummary resourceName="Entry_iisnodedev_LongSummary">This package contains a native IIS 7.x module for hosting node.js application in IIS 7.x. The module supports running node.js applications side by side with other application types (ASP.NET, PHP, WCF, static files). It supports auto-update of application code, scalability to multi-core machines, and access to node.js log files over HTTP.</longSummary>
+ <id>http://go.microsoft.com/?linkid=9790232</id>
+ <link href="http://www.microsoft.com/web/webpi/iisnode" />
+ <published>2012-05-09T12:00:00Z</published>
+ <updated>2012-08-06T12:00:00Z</updated>
+ <author>
+ <name>Microsoft Corporation</name>
+ <uri>http://www.microsoft.com/</uri>
+ </author>
+ <searchExclude/>
+ <images>
+ <icon>http://www.iis.net/favicon.ico</icon>
+ </images>
+ <discoveryHint idref="DH_iisnodedev_exists" />
+ <dependency>
+ <and>
+ <dependency>
+ <productId>VC10Redist_NoWoW</productId>
+ </dependency>
+ <dependency>
+ <productId>NodeJS</productId>
+ </dependency>
+ </and>
+ </dependency>
+ <!-- Installers-->
+ <installers>
+ <installer>
+ <id>1</id>
+ <architectures>
+ <x86 />
+ </architectures>
+ <eulaURL>https://raw.github.com/WindowsAzure/iisnode/master/LICENSE.txt</eulaURL>
+ <installerFile>
+ <fileSize>1077</fileSize>
+ <installerURL>https://github.com/downloads/WindowsAzure/iisnode/iisnode-dev-v0.1.21.msi</installerURL>
+ <sha1>aa13aeb47389463394e739a7181f9eb9300ea505</sha1>
+ </installerFile>
+ <installCommands>
+ <msiInstall>
+ <msi>%InstallerFile%</msi>
+ </msiInstall>
+ </installCommands>
+ <helpLink>http://go.microsoft.com/?linkid=9790234</helpLink>
+ </installer>
+ <installer>
+ <id>2</id>
+ <architectures>
+ <x64 />
+ </architectures>
+ <eulaURL>https://raw.github.com/WindowsAzure/iisnode/master/LICENSE.txt</eulaURL>
+ <installerFile>
+ <fileSize>1077</fileSize>
+ <installerURL>https://github.com/downloads/WindowsAzure/iisnode/iisnode-dev-v0.1.21.msi</installerURL>
+ <sha1>aa13aeb47389463394e739a7181f9eb9300ea505</sha1>
+ </installerFile>
+ <installCommands>
+ <msiInstall>
+ <msi>%InstallerFile%</msi>
+ </msiInstall>
+ </installCommands>
+ <helpLink>http://go.microsoft.com/?linkid=9790234</helpLink>
+ </installer>
+ </installers>
+ </entry>
+
<discoveryHints>
<!-- discovery hint if Windows Azure PowerShell exists-->
<discoveryHint id="DH_AzurePowerShell">
@@ -289,13 +366,13 @@
<discoveryHint>
<file>
<filePath>%programfiles%\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.dll</filePath>
- <minimumVersion>0.6.1</minimumVersion>
+ <minimumVersion>0.6.2</minimumVersion>
</file>
</discoveryHint>
<discoveryHint>
<file>
<filePath>%programfiles(x86)%\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.dll</filePath>
- <minimumVersion>0.6.1</minimumVersion>
+ <minimumVersion>0.6.2</minimumVersion>
</file>
</discoveryHint>
</or>
@@ -332,6 +409,23 @@
</discoveryHint>
</or>
</discoveryHint>
+
+ <discoveryHint id="DH_iisnodedev_exists">
+ <or>
+ <discoveryHint>
+ <file>
+ <filePath>%programfiles%\iisnode-dev\release\x86\iisnode.dll</filePath>
+ <minimumVersion>0.1.21</minimumVersion>
+ </file>
+ </discoveryHint>
+ <discoveryHint>
+ <file>
+ <filePath>%programfiles(x86)%\iisnode-dev\release\x86\iisnode.dll</filePath>
+ <minimumVersion>0.1.21</minimumVersion>
+ </file>
+ </discoveryHint>
+ </or>
+ </discoveryHint>
</discoveryHints>
<!-- end Windows Azure SDK for Node, PHP, and Python-->
@@ -390,7 +484,7 @@
</installer>
</installers>
</entry>
-
+
<!-- node.js versions for WAWS SxS support -->
<entry>
<productId>NodeJS0.6.17</productId>
@@ -847,4 +941,5 @@
</installer>
</installers>
</entry>
+
</feed>
View
8 WindowsAzurePowershell/src/Management.CloudService.Test/Management.CloudService.Test.csproj
@@ -76,13 +76,11 @@
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Microsoft.Samples.WindowsAzure.ServiceManagement">
+ <Reference Include="Microsoft.Samples.WindowsAzure.ServiceManagement, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Microsoft.Samples.WindowsAzure.ServiceManagement.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="Microsoft.WindowsAzure.Management.Service">
- <HintPath>..\lib\Microsoft.WindowsAzure.Management.Service.dll</HintPath>
- </Reference>
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Microsoft.WindowsAzure.StorageClient.dll</HintPath>
@@ -112,7 +110,9 @@
<Compile Include="TestData\AzureServiceWrapper.cs" />
<Compile Include="Tests\AzureTools\CsPackTests.cs" />
<Compile Include="Tests\AzureTools\CsRunTests.cs" />
+ <Compile Include="Tests\Cmdlet\AddAzureCacheWorkerRoleTests.cs" />
<Compile Include="Tests\Cmdlet\CmdletBaseTests.cs" />
+ <Compile Include="Tests\Cmdlet\EnableAzureMemcacheRoleTests.cs" />
<Compile Include="Tests\Cmdlet\GetAzureServiceProjectRuntimesTest.cs" />
<Compile Include="Tests\Cmdlet\SetAzureRuntimeTests.cs" />
<Compile Include="Tests\Cmdlet\SetAzureServiceProjectTests.cs" />
View
4 WindowsAzurePowershell/src/Management.CloudService.Test/Model/RemoveAzurePublishSettings.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Management.Services;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Model
{
+ using Management.Services;
+
public class RemoveAzurePublishSettingsCommand
{
public void RemovePublishSettingsProcess(string azureSdkDirPath)
View
3  WindowsAzurePowershell/src/Management.CloudService.Test/Properties/AssemblyInfo.cs
@@ -13,7 +13,6 @@
// ----------------------------------------------------------------------------------
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -42,4 +41,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("0.6.2")]
+[assembly: AssemblyFileVersion("0.6.7")]
View
10 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/AzureServiceWrapper.cs
@@ -12,15 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using System.IO;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.TestData
{
+ using System.IO;
+ using CloudService.Model;
+
class AzureServiceWrapper : AzureService
{
public AzureServiceWrapper(string rootPath, string serviceName, string scaffoldingPath) : base(rootPath, serviceName, scaffoldingPath) { }
View
22 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/Data.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.TestData
{
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Text;
+ using CloudService.Model;
+ using Services;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+
static class Data
{
// To Do:
@@ -117,7 +117,7 @@ private static void InitializeValidStorageServiceData()
myStore.StorageServiceKeys.Secondary = "=w8uidjew4378891289";
myStore.StorageServiceProperties = new StorageServiceProperties();
myStore.StorageServiceProperties.Location = ArgumentConstants.Locations[Microsoft.WindowsAzure.Management.CloudService.Model.Location.NorthCentralUS];
- myStore.StorageServiceProperties.Status = StorageAccountStatus.Created;
+ myStore.StorageServiceProperties.Status = StorageServiceStatus.Created;
ValidStorageService.Add(myStore);
StorageService testStore = new StorageService();
@@ -127,7 +127,7 @@ private static void InitializeValidStorageServiceData()
testStore.StorageServiceKeys.Secondary = "==0--3210-//121313233290sd";
testStore.StorageServiceProperties = new StorageServiceProperties();
testStore.StorageServiceProperties.Location = ArgumentConstants.Locations[Microsoft.WindowsAzure.Management.CloudService.Model.Location.EastAsia];
- testStore.StorageServiceProperties.Status = StorageAccountStatus.Creating;
+ testStore.StorageServiceProperties.Status = StorageServiceStatus.Creating;
ValidStorageService.Add(testStore);
StorageService MyCompanyStore = new StorageService();
@@ -137,7 +137,7 @@ private static void InitializeValidStorageServiceData()
MyCompanyStore.StorageServiceKeys.Secondary = "023432dfelfema1=";
MyCompanyStore.StorageServiceProperties = new StorageServiceProperties();
MyCompanyStore.StorageServiceProperties.Location = ArgumentConstants.Locations[Microsoft.WindowsAzure.Management.CloudService.Model.Location.NorthEurope];
- MyCompanyStore.StorageServiceProperties.Status = StorageAccountStatus.ResolvingDns;
+ MyCompanyStore.StorageServiceProperties.Status = StorageServiceStatus.ResolvingDns;
ValidStorageService.Add(MyCompanyStore);
}
View
6 WindowsAzurePowershell/src/Management.CloudService.Test/TestData/ServiceSettingsTestData.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Collections.Generic;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.TestData
{
+ using System.Collections.Generic;
+ using CloudService.Model;
+
class ServiceSettingsTestData
{
// To Do: Add bad cases for ServiceSettings
View
16 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/AzureTools/CsPackTests.cs
@@ -12,18 +12,14 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using System.IO;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.AzureTools
{
+ using System.IO;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class CsPackTests : TestBase
{
View
7 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/AzureTools/CsRunTests.cs
@@ -12,12 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Management.CloudService;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.AzureTools;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.AzureTools
{
+ using CloudService.AzureTools;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class CsRunTests : TestBase
{
View
58 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/AddAzureCacheWorkerRoleTests.cs
@@ -0,0 +1,58 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright 2011 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.CloudService.Test.Tests
+{
+ using System.IO;
+ using CloudService.Cmdlet;
+ using CloudService.Properties;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using Microsoft.WindowsAzure.Management.CloudService.ServiceDefinitionSchema;
+ using Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema;
+ using ConfigConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema.ConfigurationSetting;
+
+ [TestClass]
+ public class AddAzureCacheWorkerRoleTests : TestBase
+ {
+ [TestMethod]
+ public void AddAzureCacheWorkerRoleProcess()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string servicePath = Path.Combine(files.RootPath, "AzureService");
+ string roleName = "WorkerRole";
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(roleName, 1, servicePath);
+
+ WorkerRole cacheWorkerRole = Testing.GetWorkerRole(servicePath, roleName);
+ RoleSettings cacheRoleSettings = Testing.GetRole(servicePath, roleName);
+
+ AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, "AzureService", "WorkerRole"), Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole));
+
+ AzureAssert.WorkerRoleImportsExists(new Import { moduleName = Resources.CachingModuleName }, cacheWorkerRole);
+
+ AzureAssert.LocalResourcesLocalStoreExists(new LocalStore { name = Resources.CacheDiagnosticStoreName, cleanOnRoleRecycle = false },
+ cacheWorkerRole.LocalResources);
+
+ Assert.IsNull(cacheWorkerRole.Endpoints.InputEndpoint);
+
+ AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.NamedCacheSettingName, value = Resources.NamedCacheSettingValue }, cacheRoleSettings.ConfigurationSettings);
+ AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.DiagnosticLevelName, value = Resources.DiagnosticLevelValue }, cacheRoleSettings.ConfigurationSettings);
+ AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingCacheSizePercentageSettingName, value = string.Empty }, cacheRoleSettings.ConfigurationSettings);
+ AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingConfigStoreConnectionStringSettingName, value = string.Empty }, cacheRoleSettings.ConfigurationSettings);
+ }
+ }
+ }
+}
View
20 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/CmdletBaseTests.cs
@@ -12,19 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.WindowsAzure.Management.CloudService.Services;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.WindowsAzure.Management.CloudService.Utilities;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using System;
+ using Cmdlets.Common;
+ using Management.Utilities;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class CmdletBaseTests
{
@@ -39,7 +35,7 @@ public void SafeWriteObjectWritesToWriter()
}
- public class FakeCmdlet : CloudCmdlet<IServiceManagement>
+ public class FakeCmdlet : CloudBaseCmdlet<IServiceManagement>
{
public FakeCmdlet(IMessageWriter writer) : base(writer)
{
View
22 ...owsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/DisableAzureRemoteDesktopCommandTest.cs
@@ -12,19 +12,19 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.Extensions;
-using Microsoft.WindowsAzure.Management.Services;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test
{
+ using System.Collections.Generic;
+ using System.Linq;
+ using CloudService.Model;
+ using Cmdlet;
+ using Extensions;
+ using Management.Services;
+ using Management.Test.Stubs;
+ using Node.Cmdlet;
+ using TestData;
+ using VisualStudio.TestTools.UnitTesting;
+
/// <summary>
/// Basic unit tests for the Enable-Enable-AzureServiceProjectRemoteDesktop command.
/// </summary>
View
217 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/EnableAzureMemcacheRoleTests.cs
@@ -0,0 +1,217 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright 2011 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.CloudService.Test.Tests
+{
+ using System.IO;
+ using CloudService.Cmdlet;
+ using CloudService.Properties;
+ using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
+ using Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema;
+ using Microsoft.WindowsAzure.Management.CloudService.ServiceDefinitionSchema;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using ConfigConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema.ConfigurationSetting;
+ using DefConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceDefinitionSchema.ConfigurationSetting;
+
+ [TestClass]
+ public class EnableAzureMemcacheRoleTests : TestBase
+ {
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcess()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string webRoleName = "WebRole";
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWebRoleCommand().AddAzureNodeWebRoleProcess(webRoleName, 1, servicePath);
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+ new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ WebRole webRole = Testing.GetWebRole(servicePath, webRoleName);
+ RoleSettings roleSettings = Testing.GetRole(servicePath, webRoleName);
+
+ AzureAssert.RuntimeExists(webRole.Startup.Task, Resources.CacheRuntimeValue);
+
+ AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, serviceName, webRoleName), Path.Combine(Resources.CacheScaffolding, Resources.WebRole));
+ AzureAssert.StartupTaskExists(webRole.Startup.Task, Resources.CacheStartupCommand);
+
+ AzureAssert.InternalEndpointExists(webRole.Endpoints.InternalEndpoint,
+ new InternalEndpoint { name = Resources.MemcacheEndpointName, protocol = InternalProtocol.tcp, port = Resources.MemcacheEndpointPort});
+
+ LocalStore localStore = new LocalStore
+ {
+ name = Resources.CacheDiagnosticStoreName,
+ cleanOnRoleRecycle = false
+ };
+
+ AzureAssert.LocalResourcesLocalStoreExists(localStore, webRole.LocalResources);
+
+ DefConfigurationSetting diagnosticLevel = new DefConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName };
+ AzureAssert.ConfigurationSettingExist(diagnosticLevel, webRole.ConfigurationSettings);
+
+ ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue };
+ AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, roleSettings.ConfigurationSettings);
+
+ string webConfigPath = string.Format(@"{0}\{1}\{2}", servicePath, webRoleName, Resources.WebCloudConfig);
+ string webCloudConfig = File.ReadAllText(webConfigPath);
+ Assert.IsTrue(webCloudConfig.Contains("configSections"));
+ Assert.IsTrue(webCloudConfig.Contains("dataCacheClients"));
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache with non-existing cache worker role will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessCacheRoleDoesNotExistFail()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string webRoleName = "WebRole";
+ string expected = string.Format(Resources.RoleNotFoundMessage, cacheRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWebRoleCommand().AddAzureNodeWebRoleProcess(webRoleName, 1, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache with non-existing role to enable on will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessRoleDoesNotExistFail()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string webRoleName = "WebRole";
+ string expected = string.Format(Resources.RoleNotFoundMessage, webRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache using same cache worker role on role with cache will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessAlreadyEnabledFail()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string webRoleName = "WebRole";
+ string expected = string.Format(Resources.CacheAlreadyEnabledMsg, webRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWebRoleCommand().AddAzureNodeWebRoleProcess(webRoleName, 1, servicePath);
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+ new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache using different cache worker role on role with cache will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessAlreadyEnabledNewCacheRoleFail()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string newCacheRoleName = "NewCacheWorkerRole";
+ string webRoleName = "WebRole";
+ string expected = string.Format(Resources.CacheAlreadyEnabledMsg, webRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWebRoleCommand().AddAzureNodeWebRoleProcess(webRoleName, 1, servicePath);
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+ new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(newCacheRoleName, 1, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache on worker role will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessOnWorkerRoleWillFail()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string cacheRoleName = "WorkerRole";
+ string workerRoleName = "WebRole";
+ string expected = string.Format(Resources.EnableMemcacheOnWorkerRoleErrorMsg, workerRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWorkerRoleCommand().AddAzureNodeWorkerRoleProcess(workerRoleName, 1, servicePath);
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(workerRoleName, cacheRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+
+ /// <summary>
+ /// Verify that enabling cache using non-cache worker role will fail.
+ /// </summary>
+ [TestMethod]
+ public void EnableAzureMemcacheRoleProcessUsingNonCacheWorkerRole()
+ {
+ using (FileSystemHelper files = new FileSystemHelper(this))
+ {
+ string serviceName = "AzureService";
+ string servicePath = Path.Combine(files.RootPath, serviceName);
+ string workerRoleName = "WorkerRole";
+ string webRoleName = "WebRole";
+ string expected = string.Format(Resources.NotCacheWorkerRole, workerRoleName);
+ new NewAzureServiceProjectCommand().NewAzureServiceProcess(files.RootPath, "AzureService");
+ new AddAzureNodeWebRoleCommand().AddAzureNodeWebRoleProcess(webRoleName, 1, servicePath);
+ new AddAzureNodeWorkerRoleCommand().AddAzureNodeWorkerRoleProcess(workerRoleName, 1, servicePath);
+
+ string actual = new EnableAzureMemcacheRoleCommand().EnableAzureMemcacheRoleProcess(webRoleName, workerRoleName, servicePath);
+
+ Assert.AreEqual<string>(expected, actual);
+ }
+ }
+ }
+}
View
26 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/EnableAzureRemoteDesktopCommandTest.cs
@@ -12,21 +12,21 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Services;
-using Microsoft.WindowsAzure.Management.Extensions;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test
{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Security;
+ using CloudService.Model;
+ using Cmdlet;
+ using Extensions;
+ using Management.Services;
+ using Management.Test.Stubs;
+ using Node.Cmdlet;
+ using TestData;
+ using VisualStudio.TestTools.UnitTesting;
+
/// <summary>
/// Basic unit tests for the Enable-AzureServiceProjectRemoteDesktop command.
/// </summary>
View
15 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/NewAzureServiceTests.cs
@@ -12,18 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.IO;
-using System.Reflection;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using CloudService.Cmdlet;
+ using CloudService.Properties;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class NewAzureServiceTests : TestBase
{
View
106 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/PublishAzureServiceCommandTests.cs
@@ -12,24 +12,27 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Packaging;
-using System.Linq;
-using System.ServiceModel;
-using System.Text.RegularExpressions;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.IO.Packaging;
+ using System.Linq;
+ using System.ServiceModel;
+ using System.Text.RegularExpressions;
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using CloudService.Node.Cmdlet;
+ using CloudService.Properties;
+ using Management.Test.Stubs;
+ using Management.Test.Tests.Utilities;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+ using Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using ConfigConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema.ConfigurationSetting;
+
/// <summary>
/// Tests for the Publish-AzureServiceProject command.
/// </summary>
@@ -63,6 +66,8 @@ public void PublishAzureServiceCreateBasicPackageTest()
NewAzureServiceProjectCommand newService = new NewAzureServiceProjectCommand();
newService.NewAzureServiceProcess(files.RootPath, serviceName);
string servicePath = files.CreateDirectory(serviceName);
+ channel.GetStorageServiceThunk = ss => new StorageService { ServiceName = serviceName };
+ channel.GetStorageKeysThunk = sk => new StorageService { StorageServiceKeys = new StorageServiceKeys { Primary = serviceName } };
// Get the publishing process started by creating the package
PublishAzureServiceProjectCommand publishService = new PublishAzureServiceProjectCommand(channel);
@@ -102,6 +107,48 @@ public void PublishAzureServiceCreateBasicPackageTest()
}
/// <summary>
+ /// Test a basic publish scenario.
+ ///</summary>
+ [TestMethod]
+ public void PublishAzureServiceWithCacheWorkerRoleTest()
+ {
+ // Create a temp directory that we'll use to "publish" our service
+ using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true })
+ {
+ // Import our default publish settings
+ files.CreateAzureSdkDirectoryAndImportPublishSettings();
+
+ // Create a new channel to mock the calls to Azure and
+ // determine all of the results that we'll need.
+ SimpleServiceManagement channel = new SimpleServiceManagement();
+
+ // Create a new service that we're going to publish
+ string serviceName = "TEST_SERVICE_NAME";
+ string storageName = "testx5fservicex5fname";
+ string storageKey = "imba key";
+ string cacheRoleName = "cache_worker";
+ NewAzureServiceProjectCommand newService = new NewAzureServiceProjectCommand();
+ newService.NewAzureServiceProcess(files.RootPath, serviceName);
+ string servicePath = files.CreateDirectory(serviceName);
+ channel.GetStorageServiceThunk = ss => new StorageService { ServiceName = storageName };
+ channel.GetStorageKeysThunk = sk => new StorageService { StorageServiceKeys = new StorageServiceKeys { Primary = storageKey } };
+
+ // Add caching worker role
+ new AddAzureCacheWorkerRoleCommand().AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, servicePath);
+
+ // Get the publishing process started by creating the package
+ PublishAzureServiceProjectCommand publishService = new PublishAzureServiceProjectCommand(channel);
+ publishService.InitializeSettingsAndCreatePackage(servicePath);
+
+ AzureService azureService = new AzureService(servicePath, null);
+ RoleSettings cacheRole = azureService.Components.GetCloudConfigRole(cacheRoleName);
+ AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting {
+ name = Resources.CachingConfigStoreConnectionStringSettingName,
+ value = string.Format(Resources.CachingConfigStoreConnectionStringSettingValue, storageName, storageKey) }, cacheRole.ConfigurationSettings);
+ }
+ }
+
+ /// <summary>
/// Test a publish scenario with worker and web roles.
///</summary>
[TestMethod]
@@ -129,6 +176,8 @@ public void PublishAzureServiceCreateWorkersPackageTest()
AddAzureNodeWorkerRoleCommand newWorkerRole = new AddAzureNodeWorkerRoleCommand();
string workerRoleName = "NODE_WORKER_ROLE";
string workerRolePath = newWorkerRole.AddAzureNodeWorkerRoleProcess(workerRoleName, 2, servicePath);
+ channel.GetStorageServiceThunk = ss => new StorageService { ServiceName = serviceName };
+ channel.GetStorageKeysThunk = sk => new StorageService { StorageServiceKeys = new StorageServiceKeys { Primary = serviceName } };
// Get the publishing process started by creating the package
PublishAzureServiceProjectCommand publishService = new PublishAzureServiceProjectCommand(channel);
@@ -185,6 +234,9 @@ public void PublishAzureServiceManifestTest()
NewAzureServiceProjectCommand newService = new NewAzureServiceProjectCommand();
newService.NewAzureServiceProcess(files.RootPath, serviceName);
string servicePath = files.CreateDirectory(serviceName);
+ channel.GetStorageServiceThunk = ss => new StorageService { ServiceName = serviceName };
+ channel.GetStorageKeysThunk = sk => new StorageService { StorageServiceKeys = new StorageServiceKeys { Primary = serviceName } };
+
// Add web and worker roles
AddAzureNodeWebRoleCommand newWebRole = new AddAzureNodeWebRoleCommand();
string defaultWebRoleName = "WebRoleDefault";
@@ -261,7 +313,7 @@ public void PublishAzureNodeServiceSimpleDeployTest()
new RoleInstance[] {
new RoleInstance() {
InstanceName = "Role_IN_0",
- InstanceStatus = RoleInstanceStatus.Ready
+ InstanceStatus = RoleInstanceStatus.ReadyRole
} })
};
channel.ListCertificatesThunk = ar => new CertificateList();
@@ -321,7 +373,7 @@ public void PublishAzurePHPServiceSimpleDeployTest()
new RoleInstance[] {
new RoleInstance() {
InstanceName = "Role_IN_0",
- InstanceStatus = RoleInstanceStatus.Ready
+ InstanceStatus = RoleInstanceStatus.ReadyRole
} })
};
channel.ListCertificatesThunk = ar => new CertificateList();
@@ -390,7 +442,7 @@ public void PublishAzureServiceInvolvedDeployTest()
bool storageCreated = false;
StorageService storageService = new StorageService()
{
- StorageServiceProperties = new StorageServiceProperties() { Status = StorageAccountStatus.Creating }
+ StorageServiceProperties = new StorageServiceProperties() { Status = StorageServiceStatus.Creating }
};
Deployment deployment = new Deployment()
{
@@ -399,7 +451,7 @@ public void PublishAzureServiceInvolvedDeployTest()
new RoleInstance[] {
new RoleInstance() {
InstanceName = "Role_IN_0",
- InstanceStatus = RoleInstanceStatus.Ready
+ InstanceStatus = RoleInstanceStatus.ReadyRole
} })
};
@@ -409,8 +461,8 @@ public void PublishAzureServiceInvolvedDeployTest()
channel.GetStorageServiceThunk = MultiCallResponseBuilder(
() => null,
() => storageService,
- () => { storageService.StorageServiceProperties.Status = StorageAccountStatus.Created; return storageService; });
- channel.CreateStorageAccountThunk = ar => storageCreated = true;
+ () => { storageService.StorageServiceProperties.Status = StorageServiceStatus.Created; return storageService; });
+ channel.CreateStorageServiceThunk = ar => storageCreated = true;
channel.CreateHostedServiceThunk = ar => createdHostedService = true;
channel.GetHostedServiceWithDetailsThunk = ar => { throw new EndpointNotFoundException(); };
channel.GetStorageKeysThunk = ar => new StorageService() { StorageServiceKeys = new StorageServiceKeys() { Primary = "VGVzdEtleSE=" } };
@@ -443,7 +495,7 @@ public void PublishAzureServiceInvolvedDeployTest()
Assert.IsTrue(storageCreated);
Assert.IsTrue(createdHostedService);
Assert.IsTrue(createdOrUpdatedDeployment);
- Assert.AreEqual(StorageAccountStatus.Created, storageService.StorageServiceProperties.Status);
+ Assert.AreEqual(StorageServiceStatus.Created, storageService.StorageServiceProperties.Status);
Assert.AreEqual(DeploymentStatus.Starting, deployment.Status);
Assert.AreEqual<string>(serviceName, service.ServiceName);
}
@@ -481,7 +533,7 @@ public void PublishAzureServiceUpgradeTest()
new RoleInstance[] {
new RoleInstance() {
InstanceName = "Role_IN_0",
- InstanceStatus = RoleInstanceStatus.Ready
+ InstanceStatus = RoleInstanceStatus.ReadyRole
} })
};
channel.ListCertificatesThunk = ar => new CertificateList();
@@ -535,7 +587,7 @@ public void PublishAzureServiceChangeServiceNameTest()
new RoleInstance[] {
new RoleInstance() {
InstanceName = "Role_IN_0",
- InstanceStatus = RoleInstanceStatus.Ready
+ InstanceStatus = RoleInstanceStatus.ReadyRole
} })
};
channel.ListCertificatesThunk = ar => new CertificateList();
@@ -589,7 +641,7 @@ public void PublishAzureServiceCreateDeploymentForExistingService()
if (createdOrUpdatedDeployment)
{
Deployment deployment = new Deployment("TEST_SERVICE_NAME", "Production", DeploymentStatus.Running);
- deployment.RoleInstanceList = new RoleInstanceList(new RoleInstance[] { new RoleInstance() { InstanceName = "Role_IN_0", InstanceStatus = RoleInstanceStatus.Ready } });
+ deployment.RoleInstanceList = new RoleInstanceList(new RoleInstance[] { new RoleInstance() { InstanceName = "Role_IN_0", InstanceStatus = RoleInstanceStatus.ReadyRole } });
return deployment;
}
else
@@ -642,6 +694,8 @@ public void PublishAzureServiceRemovesNodeLogs()
NewAzureServiceProjectCommand newService = new NewAzureServiceProjectCommand();
newService.NewAzureServiceProcess(files.RootPath, serviceName);
string servicePath = files.CreateDirectory(serviceName);
+ channel.GetStorageServiceThunk = ss => new StorageService { ServiceName = serviceName };
+ channel.GetStorageKeysThunk = sk => new StorageService { StorageServiceKeys = new StorageServiceKeys { Primary = serviceName } };
// Add a web role
AddAzureNodeWebRoleCommand newWebRole = new AddAzureNodeWebRoleCommand();
View
24 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/RemoveAzureServiceTests.cs
@@ -12,22 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using System.ServiceModel;
-using Microsoft.WindowsAzure.Management.Extensions;
-using Microsoft.WindowsAzure.Management.Services;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using System.ServiceModel;
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using Extensions;
+ using Management.Test.Stubs;
+ using Services;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+
[TestClass]
public class RemoveAzureServiceTests : TestBase
{
View
16 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/SetAzureServiceProjectTests.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Collections.Generic;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using System;
+ using System.Collections.Generic;
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using TestData;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class SetAzureServiceProjectTests : TestBase
{
View
16 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/StartAzureServiceTests.cs
@@ -12,15 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using Management.Test.Stubs;
+ using Services;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+
[TestClass]
public class StartAzureServiceTests : TestBase
{
View
16 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Cmdlet/StopAzureServiceTests.cs
@@ -12,15 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Cmdlet
{
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using Management.Test.Stubs;
+ using Services;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+
[TestClass]
public class StopAzureServiceTests : TestBase
{
View
20 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/AzureServiceTests.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.IO;
-using System.Linq;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class AzureServiceTests: TestBase
{
View
25 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/DeploymentSettingsTests.cs
@@ -12,21 +12,20 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.IO;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Cmdlets;
-using Microsoft.WindowsAzure.Management.Services;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System;
+ using System.IO;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using Cmdlets;
+ using Management.Services;
+ using Management.Test.Stubs;
+ using Test.Model;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class DeploymentSettingsTests : TestBase
{
View
20 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/DeploymentStatusManagerTests.cs
@@ -12,17 +12,19 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.ServiceModel;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.WAPPSCmdlet;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Extensions;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System.ServiceModel;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using Extensions;
+ using Management.Test.Stubs;
+ using Services;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+ using Microsoft.Samples.WindowsAzure.ServiceManagement;
+
[TestClass]
public class DeploymentStatusManagerTests : TestBase
{
View
24 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServiceComponentsTests.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.IO;
-using System.Linq;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using CloudService.Cmdlet;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class ServiceComponentsTests : TestBase
{
@@ -108,14 +108,14 @@ public void ServiceComponentsTestSettingsDoesNotExistFail()
try
{
- File.Delete(paths.Settings);
+ File.Delete(paths.Definition);
ServiceComponents components = new ServiceComponents(paths);
Assert.Fail("No exception was thrown");
}
catch (Exception ex)
{
Assert.IsTrue(ex is FileNotFoundException);
- Assert.AreEqual<string>(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceSettings, paths.Settings), ex.Message);
+ Assert.AreEqual<string>(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceDefinition, paths.Definition), ex.Message);
}
}
View
18 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServicePathInfoTests.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class ServicePathInfoTests
{
@@ -42,7 +42,7 @@ public void ServicePathInfoTestEmptyRootPathFail()
catch (Exception ex)
{
Assert.IsTrue(ex is ArgumentException);
- Assert.AreEqual<string>(string.Format(Resources.InvalidOrEmptyArgumentMessage, "service root"), ex.Message);
+ Assert.AreEqual<string>(string.Format(Resources.InvalidOrEmptyArgumentMessage, "service definition (*.csdef) file"), ex.Message);
}
}
@@ -57,7 +57,7 @@ public void ServicePathInfoTestNullRootPathFail()
catch (Exception ex)
{
Assert.IsTrue(ex is ArgumentException);
- Assert.AreEqual<string>(string.Format(Resources.InvalidOrEmptyArgumentMessage, "service root"), ex.Message);
+ Assert.AreEqual<string>(string.Format(Resources.InvalidOrEmptyArgumentMessage, "service definition (*.csdef) file"), ex.Message);
}
}
View
38 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Model/ServiceSettingsTests.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Extensions;
-using Microsoft.WindowsAzure.Management.Services;
-using Microsoft.WindowsAzure.Management.Test.Stubs;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Model
{
+ using System;
+ using CloudService.Model;
+ using Extensions;
+ using Management.Services;
+ using Management.Test.Stubs;
+ using TestData;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class ServiceSettingsTests : TestBase
{
@@ -84,5 +84,25 @@ public void SanitizeServiceNameForStorageAccountName()
Assert.AreEqual("mycustomserviceiswaytooo", settings.StorageAccountName);
}
}
+
+ /// <summary>
+ /// Verify if the location of the storage account is West US or East US in case that no user provided locations.
+ /// </summary>
+ [TestMethod]
+ public void GetDefaultLocationWithWithRandomLocation()
+ {
+ // Create a temp directory that we'll use to "publish" our service
+ using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true })
+ {
+ // Import our default publish settings
+ files.CreateAzureSdkDirectoryAndImportPublishSettings();
+ string serviceName = null;
+
+ ServiceSettings settings = ServiceSettings.LoadDefault(null, null, null, null, null, "My-Custom-Service!", null, out serviceName);
+ Assert.IsTrue(settings.Location.Equals(ArgumentConstants.Locations[Location.WestUS]) ||
+ settings.Location.Equals(ArgumentConstants.Locations[Location.EastUS]));
+
+ }
+ }
}
}
View
14 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Node/Cmdlet/AddAzureNodeWebRoleTests.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.IO;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Node.Cmdlet
{
+ using System.IO;
+ using CloudService.Cmdlet;
+ using CloudService.Node.Cmdlet;
+ using CloudService.Properties;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class AddAzureNodeWebRoleTests : TestBase
{
View
14 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Node/Cmdlet/AddAzureNodeWorkerRoleTests.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.IO;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Node.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests
{
+ using System.IO;
+ using CloudService.Cmdlet;
+ using CloudService.Node.Cmdlet;
+ using CloudService.Properties;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class AddAzureNodeWorkerRoleTests : TestBase
{
View
22 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Python/Cmdlet/AddAzurePythonWebRoleTests.cs
@@ -12,24 +12,24 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-using System.IO;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.CloudService.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.Python.Cmdlet;
-using Microsoft.WindowsAzure.Management.CloudService.Test.Utilities;
-using Microsoft.WindowsAzure.Management.Utilities;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Python.Cmdlet
{
+ using System;
+ using System.Diagnostics;
+ using System.IO;
+ using CloudService.Cmdlet;
+ using CloudService.Properties;
+ using CloudService.Python.Cmdlet;
+ using Management.Utilities;
+ using Utilities;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class AddAzurePythonWebRoleTests : TestBase
{
[TestMethod]
- public void AddAzureNodeWebRoleProcess()
+ public void AddAzurePythonWebRoleProcess()
{
var pyInstall = AddAzureDjangoWebRoleCommand.FindPythonInterpreterPath();
if (pyInstall == null)
View
8 WindowsAzurePowershell/src/Management.CloudService.Test/Tests/Scaffolding/ScaffoldTests.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.IO;
-using Microsoft.WindowsAzure.Management.CloudService.Scaffolding;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Tests.Scaffolding
{
+ using System.IO;
+ using CloudService.Scaffolding;
+ using VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class ScaffoldTests : TestBase
{
View
63 WindowsAzurePowershell/src/Management.CloudService.Test/Utilities/AzureAssert.cs
@@ -12,21 +12,20 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.IO;
-using System.Security.Cryptography.X509Certificates;
-using Microsoft.WindowsAzure.Management.CloudService.Model;
-using Microsoft.WindowsAzure.Management.CloudService.Properties;
-using Microsoft.WindowsAzure.Management.CloudService.PublishSettingsSchema;
-using Microsoft.WindowsAzure.Management.CloudService.Scaffolding;
-using Microsoft.WindowsAzure.Management.CloudService.ServiceDefinitionSchema;
-using Microsoft.WindowsAzure.Management.CloudService.Test.TestData;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Management.Services;
-using ServiceConfiguration = Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema.ServiceConfiguration;
-
namespace Microsoft.WindowsAzure.Management.CloudService.Test.Utilities
{
+ using System;
+ using System.IO;
+ using CloudService.Model;
+ using CloudService.Properties;
+ using Scaffolding;
+ using ServiceConfigurationSchema;
+ using ServiceDefinitionSchema;
+ using TestData;
+ using VisualStudio.TestTools.UnitTesting;
+ using ConfigConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceConfigurationSchema.ConfigurationSetting;
+ using DefConfigurationSetting = Microsoft.WindowsAzure.Management.CloudService.ServiceDefinitionSchema.ConfigurationSetting;
+
internal static class AzureAssert
{
public static void AreEqualServiceSettings(ServiceSettings expected, ServiceSettings actual)
@@ -226,5 +225,43 @@ public static void AreEqualServiceConfiguration(ServiceConfiguration actual, str
}
}
}
+
+ public static void WorkerRoleImportsExists(Import expected, WorkerRole actual)
+ {
+ Assert.IsTrue(Array.Exists<Import>(actual.Imports, i => i.moduleName.Equals(expected.moduleName)));
+ }
+
+ public static void LocalResourcesLocalStoreExists(LocalStore expected, LocalResources actual)
+ {
+ Assert.IsTrue(Array.Exists<LocalStore>(actual.LocalStorage, l => l.name.Equals(expected.name) &&
+ l.cleanOnRoleRecycle.Equals(expected.cleanOnRoleRecycle) && l.sizeInMB.Equals(expected.sizeInMB)));
+ }
+
+ public static void ConfigurationSettingExist(DefConfigurationSetting expected, DefConfigurationSetting[] actual)
+ {
+ Assert.IsTrue(Array.Exists<DefConfigurationSetting>(actual, c => c.name == expected.name));
+ }
+
+ public static void ConfigurationSettingExist(ConfigConfigurationSetting expected, ConfigConfigurationSetting[] actual)
+ {
+ Assert.IsTrue(Array.Exists<ConfigConfigurationSetting>(actual, c => c.name == expected.name));
+ }
+
+ public static void RuntimeExists(Task[] tasks, string runtimeValue)
+ {
+ Assert.IsTrue(Array.Exists<Task>(tasks, t => Array.Exists<Variable>(t.Environment,
+ e => e.value!= null && e.value.Contains(runtimeValue))));
+ }
+
+ public static void StartupTaskExists(Task[] tasks, string startupCommand)
+ {
+ Assert.IsTrue(Array.Exists<Task>(tasks, t => t.commandLine == startupCommand));
+ }
+
+ public static void InternalEndpointExists(InternalEndpoint[] internalEndpoints, InternalEndpoint internalEndpoint)
+ {
+ Assert.IsTrue(Array.Exists<InternalEndpoint>(internalEndpoints, i => i.name == internalEndpoint.name &&
+ i.port == internalEndpoint.port && i.protocol == internalEndpoint.protocol));
+ }
}