Skip to content

Commit

Permalink
Merge pull request #58 from OctopusDeploy/beta
Browse files Browse the repository at this point in the history
Calamari 3.1.0
  • Loading branch information
michaelnoonan committed Sep 17, 2015
2 parents 3c78b55 + 4103f18 commit ce3b69e
Show file tree
Hide file tree
Showing 113 changed files with 1,512 additions and 639 deletions.
181 changes: 181 additions & 0 deletions source/Calamari.Azure.Tests/Calamari.Azure.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AB640580-250C-4B6B-AA87-74204D06D4F3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Calamari.Azure.Tests</RootNamespace>
<AssemblyName>Calamari.Azure.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MarkdownSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net40\Microsoft.WindowsAzure.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net40\Microsoft.WindowsAzure.Common.NetFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.Management.Compute.6.1.2\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NSubstitute, Version=1.8.1.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.1.8.1.0\lib\net40\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Octostache, Version=1.0.2.17, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octostache.1.0.2.17\lib\net40\Octostache.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sprache, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sprache.0.0.0.0\lib\portable-net4+netcore45+win8+wp8+sl5+MonoAndroid1+MonoTouch1\Sprache.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CloudServicePackage\ManifestSchema\AzureCloudServicePackageManifestSchemaFixture.cs" />
<Compile Include="Conventions\ChooseAzureCloudServiceConfigurationFileConventionFixture.cs" />
<Compile Include="Conventions\ConfigureAzureCloudServiceConventionFixture.cs" />
<Compile Include="Conventions\UploadAzureCloudServicePackageConventionFixture.cs" />
<Compile Include="Deployment\Azure\DeployAzureCloudServiceFixture.cs" />
<Compile Include="Deployment\Azure\DeployAzureCloudServiceSansPackageExtractionFixture.cs" />
<Compile Include="Deployment\Azure\DeployAzureWebFixture.cs" />
<Compile Include="Deployment\Azure\OctopusTestAzureSubscription.cs" />
<Compile Include="Deployment\Azure\OctopusTestCloudService.cs" />
<Compile Include="FakeSubscriptionCloudCredentials.cs" />
<Compile Include="PowerShell\AzurePowerShellContextFixture.cs" />
<Compile Include="PowerShell\AzurePowershellFixture.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="CloudServicePackage\ManifestSchema\PackageDefinition.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Calamari.Azure\Calamari.Azure.csproj">
<Project>{e58a81ec-2c83-49e4-8dd4-877e68e0759b}</Project>
<Name>Calamari.Azure</Name>
</ProjectReference>
<ProjectReference Include="..\Calamari.Tests\Calamari.Tests.csproj">
<Project>{5f1e9f19-2fe4-40de-aa15-12e2c77634bf}</Project>
<Name>Calamari.Tests</Name>
</ProjectReference>
<ProjectReference Include="..\Calamari\Calamari.csproj">
<Project>{79ce5cfa-e3ff-4376-8b49-ac1005c3e189}</Project>
<Name>Calamari</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="PowerShell\AzureSubscription.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<PropertyGroup>
<PostBuildEvent>xcopy "$(SolutionDir)..\tools\Octodiff\Octodiff.exe" "$(TargetDir)" /y
xcopy "$(SolutionDir)packages\NuGet.CommandLine.2.8.3\tools\Nuget.exe" "$(TargetDir)NuGet\" /y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
using Calamari.Integration.Azure.CloudServicePackage.ManifestSchema;
using Calamari.Azure.Integration.CloudServicePackage.ManifestSchema;
using Calamari.Util;
using NUnit.Framework;

namespace Calamari.Tests.Fixtures.Azure.CloudServicePackage.ManifestSchema
namespace Calamari.Azure.Tests.CloudServicePackage.ManifestSchema
{
[TestFixture]
public class AzureCloudServicePackageManifestSchemaFixture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
using System.IO;
using Calamari.Azure.Deployment.Conventions;
using Calamari.Deployment;
using Calamari.Deployment.Conventions;
using Calamari.Integration.FileSystem;
using Calamari.Integration.Processes;
using Calamari.Tests.Helpers;
using NSubstitute;
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Conventions
namespace Calamari.Azure.Tests.Conventions
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
public class ChooseAzureCloudServiceConfigurationFileConventionFixture
{
ICalamariFileSystem fileSystem;
RunningDeployment deployment;
VariableDictionary variables;
CalamariVariableDictionary variables;
ChooseCloudServiceConfigurationFileConvention convention;
const string StagingDirectory = "C:\\Applications\\Foo";

[SetUp]
public void SetUp()
{
fileSystem = Substitute.For<ICalamariFileSystem>();
variables = new VariableDictionary();
variables = new CalamariVariableDictionary();
variables.Set(SpecialVariables.OriginalPackageDirectoryPath, StagingDirectory);
deployment = new RunningDeployment(StagingDirectory, variables);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Calamari.Azure.Deployment.Conventions;
using Calamari.Azure.Integration;
using Calamari.Commands.Support;
using Calamari.Deployment;
using Calamari.Deployment.Conventions;
using Calamari.Integration.Azure;
using Calamari.Integration.FileSystem;
using Calamari.Integration.Processes;
using Calamari.Tests.Helpers;
using Calamari.Tests.Helpers.Azure;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Management.Compute.Models;
using NSubstitute;
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Conventions
namespace Calamari.Azure.Tests.Conventions
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
Expand All @@ -25,7 +25,7 @@ public class ConfigureAzureCloudServiceConventionFixture
ISubscriptionCloudCredentialsFactory credentialsFactory;
IAzureCloudServiceConfigurationRetriever configurationRetriever;
RunningDeployment deployment;
VariableDictionary variables;
CalamariVariableDictionary variables;
ConfigureAzureCloudServiceConvention convention;
const string StagingDirectory = "C:\\Applications\\Foo";
const string DefaultConfigurationFileName = "ServiceConfiguration.Cloud.cscfg";
Expand All @@ -45,7 +45,7 @@ public void SetUp()
fileSystem = Substitute.For<ICalamariFileSystem>();
credentialsFactory = Substitute.For<ISubscriptionCloudCredentialsFactory>();
configurationRetriever = Substitute.For<IAzureCloudServiceConfigurationRetriever>();
variables = new VariableDictionary();
variables = new CalamariVariableDictionary();
variables.Set(SpecialVariables.OriginalPackageDirectoryPath, StagingDirectory);
deployment = new RunningDeployment(StagingDirectory, variables);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using System;
using System.IO;
using System.Linq.Expressions;
using System.Text;
using Calamari.Azure.Deployment.Conventions;
using Calamari.Azure.Integration;
using Calamari.Deployment;
using Calamari.Deployment.Conventions;
using Calamari.Integration.Azure;
using Calamari.Integration.FileSystem;
using Calamari.Integration.Processes;
using Calamari.Tests.Helpers;
using Calamari.Tests.Helpers.Azure;
using Microsoft.WindowsAzure;
using NSubstitute;
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Conventions
namespace Calamari.Azure.Tests.Conventions
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
Expand All @@ -26,7 +25,7 @@ public class UploadAzureCloudServicePackageConventionFixture
const string storageAccountName = "AcmeStorage";
ICalamariFileSystem fileSystem;
IAzurePackageUploader packageUploader;
VariableDictionary variables;
CalamariVariableDictionary variables;
RunningDeployment deployment;
ISubscriptionCloudCredentialsFactory credentialsFactory;
UploadAzureCloudServicePackageConvention convention;
Expand All @@ -40,7 +39,7 @@ public void SetUp()
credentialsFactory.GetCredentials(azureSubscriptionId, certificateThumbprint, certificateBytes)
.Returns(new FakeSubscriptionCloudCredentials(azureSubscriptionId));

variables = new VariableDictionary();
variables = new CalamariVariableDictionary();
variables.Set(SpecialVariables.OriginalPackageDirectoryPath, stagingDirectory);
variables.Set(SpecialVariables.Action.Azure.SubscriptionId, azureSubscriptionId);
variables.Set(SpecialVariables.Action.Azure.CertificateThumbprint, certificateThumbprint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Deployment.Azure
namespace Calamari.Azure.Tests.Deployment.Azure
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Deployment.Azure
namespace Calamari.Azure.Tests.Deployment.Azure
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.IO;
using System.Text.RegularExpressions;
using Calamari.Deployment;
using Calamari.Integration.FileSystem;
Expand All @@ -9,7 +7,7 @@
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Deployment.Azure
namespace Calamari.Azure.Tests.Deployment.Azure
{
[TestFixture]
[Category(TestEnvironment.CompatableOS.Windows)]
Expand All @@ -24,14 +22,12 @@ public class DeployAzureWebFixture : CalamariFixture
public void Deploy()
{
const string webAppName = "octodemo003-dev";
const string webSpaceName = "southeastasiawebspace";

OctopusTestAzureSubscription.IgnoreIfCertificateNotInstalled();

variables = new VariableDictionary();
OctopusTestAzureSubscription.PopulateVariables(variables);
variables.Set(SpecialVariables.Action.Azure.WebAppName, webAppName);
variables.Set(SpecialVariables.Action.Azure.WebSpaceName, webSpaceName);

variables.Set("foo", "bar");
// Enable file substitution and configure the target
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using NUnit.Framework;
using Octostache;

namespace Calamari.Tests.Fixtures.Deployment.Azure
namespace Calamari.Azure.Tests.Deployment.Azure
{
public class OctopusTestAzureSubscription
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Calamari.Deployment;
using Octostache;

namespace Calamari.Tests.Fixtures.Deployment.Azure
namespace Calamari.Azure.Tests.Deployment.Azure
{
public class OctopusTestCloudService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.WindowsAzure;

namespace Calamari.Tests.Helpers.Azure
namespace Calamari.Azure.Tests
{
public class FakeSubscriptionCloudCredentials : SubscriptionCloudCredentials
{
Expand Down
Loading

0 comments on commit ce3b69e

Please sign in to comment.