Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 19 additions & 19 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dirs.proj" />
<PropertyGroup>
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
<LibrarySourceFolder>$(LibraryRoot)src</LibrarySourceFolder>
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
<LibraryNugetPackageFolder>$(LibraryRoot)\restoredPackages</LibraryNugetPackageFolder>
<LibraryFriendlyName>Microsoft Azure Management Libraries</LibraryFriendlyName>
<AuthenticationSolution>src\Authentication\Authentication.sln</AuthenticationSolution>
<ManagementLibrariesSolution>AzureManagementLibraries.sln</ManagementLibrariesSolution>
<BinariesFolder>$(LibraryRoot)binaries</BinariesFolder>
<Import Project="dirs.proj" />
<PropertyGroup>
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
<LibrarySourceFolder>$(LibraryRoot)src</LibrarySourceFolder>
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
<LibraryNugetPackageFolder>$(LibraryRoot)\restoredPackages</LibraryNugetPackageFolder>
<LibraryFriendlyName>Microsoft Azure Management Libraries</LibraryFriendlyName>
<AuthenticationSolution>src\Authentication\Authentication.sln</AuthenticationSolution>
<ManagementLibrariesSolution>AzureManagementLibraries.sln</ManagementLibrariesSolution>
<BinariesFolder>$(LibraryRoot)binaries</BinariesFolder>
<PoliCheckOutputDir>$(LibraryRoot)PolicheckOutput</PoliCheckOutputDir>
<BuiltPackageOutputDir>$(BinariesFolder)\packages</BuiltPackageOutputDir>
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<CodeSign Condition=" '$(CodeSign)' == '' ">false</CodeSign>
<Scope Condition=" '$(Scope)' == '' ">All</Scope>
<NuGetCommand>&quot;$(LibraryToolsFolder)\nuget.exe&quot;</NuGetCommand>
<BuiltPackageOutputDir>$(BinariesFolder)\packages</BuiltPackageOutputDir>
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<CodeSign Condition=" '$(CodeSign)' == '' ">false</CodeSign>
<Scope Condition=" '$(Scope)' == '' ">All</Scope>
<NuGetCommand>&quot;$(LibraryToolsFolder)\nuget.exe&quot;</NuGetCommand>
<NuGetKey Condition=" '$(NuGetKey)' == '' ">1234</NuGetKey>
<BuildInParallel>true</BuildInParallel>
<NugetPackageName/>
<ImportDirectoryBuildTargets>true</ImportDirectoryBuildTargets>
<DefaultPathTokenToIgnore>$(IgnorePathTokens) Microsoft.Azure.KeyVault.Samples Gallery Intune FileConventions FileStaging ConfigureAwaitAnalyzer ObjectModelCodeGeneration Azure.Batch.IntegrationTests Azure.Batch.ProtocolTests IntegrationTestCommon</DefaultPathTokenToIgnore>
</PropertyGroup>
<DefaultPathTokenToIgnore>$(IgnorePathTokens) Microsoft.Azure.KeyVault.Samples Gallery Intune FileConventions Batch.FileStaging.Tests ConfigureAwaitAnalyzer ObjectModelCodeGeneration Azure.Batch.IntegrationTests Azure.Batch.ProtocolTests IntegrationTestCommon</DefaultPathTokenToIgnore>
</PropertyGroup>
<PropertyGroup>
<CIToolsPath>$(OnPremiseBuildTasks)</CIToolsPath>
<OnPremiseBuild Condition=" Exists($(OnPremiseBuildTasks)) ">true</OnPremiseBuild>
Expand All @@ -32,6 +32,6 @@
<SdkCommonRootDir>$(LibraryRoot)src\UpgradeVS17\SdkCommon\ClientRuntime</SdkCommonRootDir>
</PropertyGroup>

<Import Project="tools\buildTargets\common.Build.props"/>
<Import Project="tools\buildTargets\common.NugetPackage.props" />
<Import Project="tools\buildTargets\common.Build.props"/>
<Import Project="tools\buildTargets\common.NugetPackage.props" />
</Project>
41 changes: 17 additions & 24 deletions src/SDKs/Batch/Support/FileStaging/AzureBatchFileStaging.sln
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Batch.FileStaging", "Src\AzureBatchFileStaging\Batch.FileStaging.csproj", "{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Batch.FileStaging", "Batch.FileStaging\Batch.FileStaging.csproj", "{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Batch.FileStaging.Tests", "Tests\Batch.FileStaging.Tests\Batch.FileStaging.Tests.csproj", "{C809285A-784D-48E4-9D7A-F5685A19F595}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Batch.FileStaging.Tests", "Batch.FileStaging.Tests\Batch.FileStaging.Tests.csproj", "{C809285A-784D-48E4-9D7A-F5685A19F595}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigureAwaitAnalyzer", "..\ClientIntegrationTesting\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer.csproj", "{48215D6D-DB21-48B8-AB03-1297A94DF696}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConfigureAwaitAnalyzer", "..\..\DataPlane\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer.csproj", "{48215D6D-DB21-48B8-AB03-1297A94DF696}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Net45-Debug|Any CPU = Net45-Debug|Any CPU
Net45-Release|Any CPU = Net45-Release|Any CPU
Portable-Debug|Any CPU = Portable-Debug|Any CPU
Portable-Release|Any CPU = Portable-Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Portable-Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Portable-Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Portable-Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU
{A7B9CD95-7EC3-4CCF-B20F-951FD2D028F1}.Net45-Release|Any CPU.Build.0 = Release|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU
{C809285A-784D-48E4-9D7A-F5685A19F595}.Net45-Release|Any CPU.Build.0 = Release|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU
{48215D6D-DB21-48B8-AB03-1297A94DF696}.Net45-Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.test.reference.props'))" />-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<NugetCommonProfileTags />
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<!--<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>-->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>netcoreapp11</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.0-beta1-build3642" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta1-build1309" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170222-09" />
<!-- <PackageReference Include="Microsoft.NETCore.App" Version="1.0.2" /> -->
</ItemGroup>
<ItemGroup>
<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>

<PropertyGroup>
<PackageId>BatchClientIntegrationsTests</PackageId>
<Description>Azure Batch File Staging integration tests</Description>
<VersionPrefix>1.0.0-preview</VersionPrefix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<!--Do not remove until VS Test Tools fixes #472-->
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Batch.FileStaging\Batch.FileStaging.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="TestResources\Data.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="TestResources\localWords.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

extern alias fs; // Temporary bridge until the Batch core NuGet without file staging is published

namespace Batch.FileStaging.Tests
{
using System;
Expand All @@ -27,9 +25,6 @@ namespace Batch.FileStaging.Tests
using Fixtures;
using Microsoft.Azure.Batch;
using Microsoft.Azure.Batch.FileStaging;
using StagingStorageAccount = fs::Microsoft.Azure.Batch.FileStaging.StagingStorageAccount; // Temporary bridge until the Batch core NuGet without file staging is published
using FileToStage = fs::Microsoft.Azure.Batch.FileStaging.FileToStage; // Temporary bridge until the Batch core NuGet without file staging is published
using SequentialFileStagingArtifact = fs::Microsoft.Azure.Batch.FileStaging.SequentialFileStagingArtifact; // Temporary bridge until the Batch core NuGet without file staging is published
using TestResources;
using IntegrationTestUtilities;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

extern alias fs;

namespace Batch.FileStaging.Tests
{
using System;
using Microsoft.Azure.Batch.FileStaging;
using Xunit;
using fs::Microsoft.Azure.Batch.FileStaging;

public class FileStagingUnitTests
{
Expand All @@ -39,5 +37,13 @@ public void StagingStorageAccount_EmptyStorageAccountBlobEndpoint_ThrowsArgument
{
Assert.Throws<ArgumentOutOfRangeException>(() => { new StagingStorageAccount(storageAccount: "account", storageAccountKey: "key", blobEndpoint: ""); });
}

[Fact]
public void ContainerName_LargeNamingFragment_DoesNotExceedMaxContainerLength()
{
const string fragment = "thisisaquitelongnamingfragmentitmightnotfit";
string name = FileStagingNamingHelpers.ConstructDefaultName(fragment);
Assert.True(name.Length <= FileStagingNamingHelpers.MaxContainerNameLength);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected CloudPool CreatePool()
this.PoolId,
VMSize,
passConfiguration,
targetDedicated: 1);
targetDedicatedComputeNodes: 1);

StartTask st = new StartTask("cmd /c hostname");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

extern alias fs; // Temporary bridge until the Batch core NuGet without file staging is published

namespace Batch.FileStaging.Tests.IntegrationTestUtilities
{
using System;
Expand All @@ -29,7 +27,6 @@ namespace Batch.FileStaging.Tests.IntegrationTestUtilities
using Microsoft.Azure.Batch.Auth;
using Microsoft.Azure.Batch.Common;
using Microsoft.Azure.Batch.FileStaging;
using StagingStorageAccount = fs::Microsoft.Azure.Batch.FileStaging.StagingStorageAccount; // Temporary bridge until the Batch core NuGet without file staging is published
using Newtonsoft.Json;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
[assembly: AssemblyTitle("Microsoft.Azure.Batch.FileStaging")]
[assembly: AssemblyDescription("Client library for uploading resource files for tasks in the Azure Batch service.")]

[assembly: AssemblyVersion("6.0.0.0")]
[assembly: AssemblyFileVersion("6.0.0.0")]
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.0.0")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Microsoft Azure")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")]
Expand All @@ -30,7 +30,7 @@


#if CODESIGN
[assembly: InternalsVisibleTo("Azure.Batch.Unit.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("Batch.FileStaging.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
#else
[assembly: InternalsVisibleTo("Azure.Batch.Unit.Tests")]
[assembly: InternalsVisibleTo("Batch.FileStaging.Tests")]
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Azure.Batch.FileStaging</PackageId>
<Description>This library simplifies uploading resource files for use by tasks in the Microsoft Azure Batch service.

Visit our home page for more detail - http://azure.microsoft.com/services/batch/.

For technical overview, see http://azure.microsoft.com/documentation/articles/batch-technical-overview/.

API reference can be found at http://go.microsoft.com/fwlink/?LinkId=717949.</Description>
<VersionPrefix>7.0.0</VersionPrefix>
<DefineConstants>$(DefineConstants);CODESIGN</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Microsoft.Azure.Batch.FileStaging</AssemblyName>
<PackageTags>Microsoft;Azure;Batch;windowsazureofficial</PackageTags>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>$(DefineConstants);FullNetFx</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<DefineConstants>$(DefineConstants);netstandard14</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WindowsAzure.Storage" Version="8.1.1" />
<PackageReference Include="Azure.Batch" Version="[7.0.1,8.0.0)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Web" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<!--<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<ProjectReference Include="..\..\..\DataPlane\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>False</Private>
</ProjectReference>
<Analyzer Include="..\..\..\DataPlane\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\bin\Debug\netstandard1.4\ConfigureAwaitAnalyzer.dll" />
</ItemGroup>-->
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading