Skip to content

AzureRT PR - CLU Test Updates #1566

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

Merged
merged 7 commits into from
Jan 1, 2016
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
6 changes: 6 additions & 0 deletions examples/compute-management/01-VirtualMachineSizes.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Param(
[string]$resourceGroupName,
[string]$resourceGroupLocation
)

Write-Host "Skip"
40 changes: 40 additions & 0 deletions examples/compute-management/01-VirtualMachineSizes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -e
printf "\n=== Managing Virtual Machine Sizes in Azure Compute ===\n"

printf "\n1. Showing VM size results in location: %s.\n" "$location"
azure vmsize get --location "$location"

printf "\n2. Checking VM size results in location: %s.\n" "$location"
vmSizeResult=`azure vmsize get --location "$location"`

if [[ $vmSizeResult == "" ]]; then
echo "Failure: No VM sizes!" 1>&2
exit 1
else
echo "Success: Non-empty Results."
fi

filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("Standard_A0"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Failure: Standard_A0 vm size not found." 1>&2
exit 1
else
echo "Success: Standard_A0 vm size found."
fi

filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("Standard_G1"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Failure: Standard_G1 vm size not found." 1>&2
exit 1
else
echo "Success: Standard_G1 vm size found."
fi

filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("NonStandard_A1"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Success: NonStandard_A1 vm size not found."
else
echo "Failure: NonStandard_A1 vm size found." 1>&2
exit 1
fi
1 change: 1 addition & 0 deletions examples/virtual-hard-disk/01-VirtualHardDisks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ azure vhd save -o --resourcegroupname "$groupName" --sourceuri https://"$storage

printf "\n5. Validating the downloaded file is the same.\n"
diffResult=`diff ./test_downloaded_by_clu.vhd $BASEDIR/test_uploaded_byps.vhd`
printf "Difference Result = '%s'.\n" "$diffResult"
if [ "$diffResult" = "" ]; then
echo "Checked"
else
Expand Down
7 changes: 7 additions & 0 deletions src/CLU/Commands.Common.ScenarioTest/SampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,12 @@ public void VirtualHardDisksTest()
var helper = _collectionState.GetRunner("virtual-hard-disk");
helper.RunScript("01-VirtualHardDisks");
}

[Fact]
public void VirtualMachineSizeTest()
{
var helper = _collectionState.GetRunner("compute-management");
helper.RunScript("01-VirtualMachineSizes");
}
}
}
4 changes: 3 additions & 1 deletion src/CLU/Sync/Upload/BlobCreatorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ private static Mutex AcquireSingleInstanceMutex(Uri destinationBlobUri)
Mutex singleInstanceMutex = null;
try
{
singleInstanceMutex = new Mutex(false, @"Global\" + mutexName);
// TODO: CLU
singleInstanceMutex = new Mutex(false);
//singleInstanceMutex = new Mutex(false, @"Global\" + mutexName);
// TODO: CLU
if (!singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(5)))
//if (!singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(5), false))
Expand Down