Skip to content

Commit 6866f6b

Browse files
committed
Add VM Size Bash Tests
1 parent 9d5e676 commit 6866f6b

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Param(
2+
[string]$resourceGroupName,
3+
[string]$resourceGroupLocation
4+
)
5+
6+
Write-Host "Skip"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
set -e
3+
printf "\n=== Managing Virtual Machine Sizes in Azure Compute ===\n"
4+
5+
printf "\nShowing VM size results in location: %s.\n" "$location"
6+
azure vmsize get --location "$location"
7+
8+
printf "\nChecking VM size results in location: %s.\n" "$location"
9+
vmSizeResult=`azure vmsize get --location "$location"`
10+
11+
if [ "$vmSizeResult" = "" ]; then
12+
echo "Failure: No VM sizes!" 1>&2
13+
exit 1
14+
else
15+
printf "\nSuccess: Non-empty Results.\n"
16+
fi
17+
18+
queryString=Standard_A0
19+
result=`echo "$vmSizeResult" | grep -q "$queryString"`
20+
if [ "$vmSizeResult" = "" ] ; then
21+
printf "\nFailure: VM Size Not Found: '%s'.\n" "$queryString"
22+
exit 1
23+
else
24+
printf "\nSuccess: VM Size Found in Results: '%s'.\n" "$queryString"
25+
fi
26+
27+
queryString=Standard_G1
28+
result=`echo "$vmSizeResult" | grep -q "$queryString"`
29+
if [ "$vmSizeResult" = "" ] ; then
30+
printf "\nFailure: VM Size Not Found: '%s'.\n" "$queryString"
31+
exit 1
32+
else
33+
printf "\nSuccess: VM Size Found in Results: '%s'.\n" "$queryString"
34+
fi

src/CLU/Commands.Common.ScenarioTest/SampleTest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,12 @@ public void RunVirtualHardDiskTest()
4545
var helper = _collectionState.GetRunner("virtual-hard-disk");
4646
helper.RunScript("01-VirtualHardDisks");
4747
}
48+
49+
[Fact]
50+
public void RunVirtualMachineSizeTest()
51+
{
52+
var helper = _collectionState.GetRunner("compute-management");
53+
helper.RunScript("01-VirtualMachineSizes");
54+
}
4855
}
4956
}

0 commit comments

Comments
 (0)