Skip to content

Microsoft.StorageSync - Adding Cmdlets to Az.StorageSync module #8465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
84cc84b
Draft 1
ankushbindlish2 Jan 4, 2019
cc0c39a
Remove excess sln file. Made test controller derive from controller b…
MiYanni Jan 4, 2019
390da97
Merge pull request #1 from MiYanni/storagesync-fix
ankushbindlish2 Jan 4, 2019
3de9350
Reverted missing components
ankushbindlish2 Jan 4, 2019
7572452
Removed dependency on multiple SDKs (this is not supported). Added re…
MiYanni Jan 4, 2019
6c06940
Merge branch 'Az-StorageSync-v5-try1' into storagesync-fix-2
MiYanni Jan 4, 2019
9d53982
Merge pull request #2 from MiYanni/storagesync-fix-2
ankushbindlish2 Jan 7, 2019
2073ea5
Remove Try/Catch to show Yanni real error
ankushbindlish2 Jan 7, 2019
1421c01
Update TestController.cs
ankushbindlish2 Jan 7, 2019
873ee16
Update TestController.cs
ankushbindlish2 Jan 7, 2019
b1829a7
Comment out till we have fix from Azure powershell team
ankushbindlish2 Jan 10, 2019
a1cb9b5
Update TestController.cs
ankushbindlish2 Jan 10, 2019
251c99c
Add Storage Client
ankushbindlish2 Jan 10, 2019
6a29a21
merge
ankushbindlish2 Jan 10, 2019
ba4eed9
merge
ankushbindlish2 Jan 10, 2019
ed5ece5
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 15, 2019
f7b9235
Update StorageSync.csproj
ankushbindlish2 Jan 15, 2019
0d8a8a8
Update StorageSync.Test.csproj
ankushbindlish2 Jan 15, 2019
9c24db0
Update Az.StorageSync.psd1
ankushbindlish2 Jan 15, 2019
660ca72
Update TestController.cs
ankushbindlish2 Jan 15, 2019
c35fdac
Add Storage projects reference to StorageSync Test project
ankushbindlish2 Jan 15, 2019
b639552
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 17, 2019
63b27fb
Visual Studio Sln bug fix + AzureRM->Az
ankushbindlish2 Jan 17, 2019
620abd6
AzureRM to Az
ankushbindlish2 Jan 17, 2019
87cc837
Update debug.ps1
ankushbindlish2 Jan 17, 2019
71f3603
Remove Storage Data place module
ankushbindlish2 Jan 17, 2019
4dbd36c
Remove ResourceManager
ankushbindlish2 Jan 17, 2019
77c68d9
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 22, 2019
b16befe
Recording for 1 test for CEP and all tests for SSS, SG
ankushbindlish2 Jan 22, 2019
77d22b2
Remove NetStandard
ankushbindlish2 Jan 22, 2019
3170674
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 23, 2019
46d4c90
v5 changes
ankushbindlish2 Jan 23, 2019
d84c7dd
Fix Win32 registry issue
ankushbindlish2 Jan 24, 2019
47cfce9
Update StorageSync.csproj
ankushbindlish2 Jan 24, 2019
33406fe
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 30, 2019
5da6063
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Jan 30, 2019
cdfe9c0
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Feb 1, 2019
a3f260d
StorageSyncService Test Recorded
ankushbindlish2 Feb 1, 2019
06aa0dd
SyncGroup Recorded test
ankushbindlish2 Feb 1, 2019
93c787e
Cloudendpoint recording
ankushbindlish2 Feb 1, 2019
c0479f0
SEP and RegisteredServer recording
ankushbindlish2 Feb 2, 2019
d0f4fe5
Update ServerEndpoint Server Guid for playback mode
ankushbindlish2 Feb 2, 2019
9cc097d
Fix CI build
ankushbindlish2 Feb 5, 2019
c2bd187
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Feb 5, 2019
4ac3300
Fix Jenkins build
ankushbindlish2 Feb 6, 2019
3f5f517
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Feb 6, 2019
5bb1678
Update AssemblyInfo.cs
ankushbindlish2 Feb 6, 2019
d986d8e
Fix AFS Agent Registrykey error
ankushbindlish2 Feb 6, 2019
86029b2
update package version for system.management
ankushbindlish2 Feb 7, 2019
1f1f29f
Update SignatureIssues.csv
ankushbindlish2 Feb 7, 2019
17d72db
Update Az.StorageSync.psd1
ankushbindlish2 Feb 7, 2019
c868fc2
Update Az.StorageSync.psd1
ankushbindlish2 Feb 8, 2019
6f45a2e
Update CredScanSuppressions.json
ankushbindlish2 Feb 8, 2019
ba7ec7f
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Feb 8, 2019
59e65b0
Attempt to fix travis error
ankushbindlish2 Feb 8, 2019
5883b69
Update build.proj
ankushbindlish2 Feb 8, 2019
762c363
Update build.proj
ankushbindlish2 Feb 8, 2019
507afee
Update build.proj
ankushbindlish2 Feb 8, 2019
98b1c55
Merge branch 'master' into Az-StorageSync-v5-try1
markcowl Feb 11, 2019
5db2992
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
ankushbindlish2 Feb 12, 2019
18c60bb
Merge branch 'Az-StorageSync-v5-try1' of https://github.com/ankushbin…
ankushbindlish2 Feb 12, 2019
35f8945
app.config
ankushbindlish2 Feb 12, 2019
89b031a
Review comments
ankushbindlish2 Feb 12, 2019
02a1b85
Review comments
ankushbindlish2 Feb 12, 2019
7d98391
review comments
ankushbindlish2 Feb 12, 2019
d00e571
Address ShouldProcess review comment
ankushbindlish2 Feb 12, 2019
c636ebe
Review comments on Exception
ankushbindlish2 Feb 12, 2019
b771f15
Escape $ in msbuild script
ankushbindlish2 Feb 12, 2019
67eb471
Update build.proj
ankushbindlish2 Feb 12, 2019
b233898
Update build.proj
ankushbindlish2 Feb 12, 2019
01aedd7
Update build.proj
ankushbindlish2 Feb 12, 2019
69606f5
Revert build.proj
ankushbindlish2 Feb 12, 2019
478fa7d
change namespace
ankushbindlish2 Feb 13, 2019
4d7c91c
Mark fix of build.proj
ankushbindlish2 Feb 13, 2019
9ccc009
Delete Microsoft.Azure.Management.StorageSync.2.8.0-preview.nupkg
ankushbindlish2 Feb 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
<LibrarySourceFolder>$(LibraryRoot)src</LibrarySourceFolder>
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
<LocalFeedFolder>$(LibraryToolsFolder)\LocalFeed</LocalFeedFolder>
<LocalFeedFolder>$(LibraryToolsFolder)/LocalFeed</LocalFeedFolder>
<Configuration Condition=" '$(Configuration)' != 'Release'">Debug</Configuration>
<CodeSign>false</CodeSign>
<!--Set this true only if you want to test the code sign workflow locally-->
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<SignedOutputRootDir>$(LibraryRoot)signed</SignedOutputRootDir>
<PackageDirectory>$(LibraryRoot)\artifacts</PackageDirectory>
<TestOutputDirectory>$(PackageDirectory)\Test</TestOutputDirectory>
<PackageDirectory>$(LibraryRoot)artifacts</PackageDirectory>
<TestOutputDirectory>$(PackageDirectory)/Test</TestOutputDirectory>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">$(LibrarySourceFolder)</NuGetPublishingSource>
<Scope Condition="$(Scope) == ''" >All</Scope>
<BuildTasksPath>$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks\bin\$(Configuration)</BuildTasksPath>
<StackPackageFolder>$(LibrarySourceFolder)\Stack</StackPackageFolder>
<BuildTasksPath>$(LibraryToolsFolder)/BuildPackagesTask/Microsoft.Azure.Build.Tasks/bin/$(Configuration)</BuildTasksPath>
<StackPackageFolder>$(LibrarySourceFolder)/Stack</StackPackageFolder>
<NetCore Condition="'$(NetCore)' != 'true'">false</NetCore>
</PropertyGroup>

Expand Down Expand Up @@ -130,7 +130,7 @@
<Message Importance="high" Text="Cleaning Cmdlets..." />

<!-- Clean out the NuGet cache -->
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Remove-Item -Path (Join-Path ($env:USERPROFILE) .nuget packages) -Recurse -Force -Confirm:$false -ErrorAction Ignore&quot;" ContinueOnError="WarnAndContinue" IgnoreExitCode="true" />
<Exec Command="dotnet nuget locals global-packages --clear" ContinueOnError="WarnAndContinue" IgnoreExitCode="true" />

<!-- Remove Package, Publish, bin, obj, and TestResults directories -->
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Remove-Item -Path $(PackageDirectory) -Recurse -Force -Confirm:$false -ErrorAction Ignore&quot;" ContinueOnError="WarnAndContinue" IgnoreExitCode="true" />
Expand Down Expand Up @@ -382,6 +382,7 @@
<CallTarget Targets="BinScopeCheck" Condition="'$(OnPremiseBuild)'" />
<CallTarget Targets="RunPoliCheck" Condition="'$(OnPremiseBuild)'" />

<Message Importance="High" Text="Creating test output directory at '$(TestOutputDirectory)'" />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Exec Command="dotnet new sln -n Azure.PowerShell --force" />
<ItemGroup>
Expand All @@ -397,13 +398,7 @@
<Exec Command="dotnet sln Azure.PowerShell.sln add $(LibraryRoot)tools/ScenarioTest.ResourceManager/ScenarioTest.ResourceManager.csproj $(LibraryRoot)tools/TestFx/TestFx.csproj" />
<!-- https://github.com/Microsoft/msbuild/issues/3157#issuecomment-378002971 -->
<!-- https://github.com/xunit/xunit/issues/1154#issuecomment-405366373 -->
<Exec Command="dotnet test Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework netcoreapp2.0 --logger trx" />

<ItemGroup>
<TestResults Include="$(LibraryRoot)src/**/TestResults/*.trx" />
</ItemGroup>
<Copy SourceFiles="@(TestResults)" DestinationFolder="$(TestOutputDirectory)" />

<Exec Command="dotnet test Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework netcoreapp2.0 --logger trx --results-directory &quot;$(TestOutputDirectory)&quot;" />
<OnError ExecuteTargets="TestFailureErrorMessage" />
</Target>

Expand All @@ -429,4 +424,4 @@
<Error Text="PoliCheck failed with a Severity 1 issue, please check the report at in artifacts/PoliCheck-Scan.html" />
</Target>

</Project>
</Project>
3 changes: 3 additions & 0 deletions src/StorageSync/StorageSync.Test/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xunit;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
Expand All @@ -36,6 +37,8 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("04542e7d-f411-4972-a5c7-25240a4a5d31")]

[assembly: CollectionBehavior(DisableTestParallelization = true)]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------


using ScenarioTests;
using Microsoft.Azure.ServiceManagement.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;
using Xunit.Abstractions;

namespace StorageSyncTests
{
public class CloudEndpointTests
{
private readonly XunitTracingInterceptor _logger;

public CloudEndpointTests(ITestOutputHelper output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCloudEndpoint()
{
TestController.NewInstance.RunPsTest(_logger, "Test-CloudEndpoint");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewCloudEndpoint()
{
TestController.NewInstance.RunPsTest(_logger, "Test-NewCloudEndpoint");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetCloudEndpoint()
{
TestController.NewInstance.RunPsTest(_logger, "Test-GetCloudEndpoint");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetCloudEndpointParentObject()
{
TestController.NewInstance.RunPsTest(_logger, "Test-GetCloudEndpointParentObject");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetCloudEndpointParentResourceId()
{
TestController.NewInstance.RunPsTest(_logger, "Test-GetCloudEndpointParentResourceId");
}


[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetCloudEndpoints()
{
TestController.NewInstance.RunPsTest(_logger, "Test-GetCloudEndpoints");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveCloudEndpoint()
{
TestController.NewInstance.RunPsTest(_logger, "Test-RemoveCloudEndpoint");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveCloudEndpointResourceId()
{
TestController.NewInstance.RunPsTest(_logger, "Test-RemoveCloudEndpointResourceId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveCloudEndpointInputObject()
{
TestController.NewInstance.RunPsTest(_logger, "Test-RemoveCloudEndpointInputObject");
}

}
}
Loading