Added docker test - Initial draft.
This commit is contained in:
Родитель
713a3fa677
Коммит
a2786b302a
|
@ -7484,7 +7484,20 @@
|
|||
<TestParameters>
|
||||
</TestParameters>
|
||||
<Priority>P0</Priority>
|
||||
</test>
|
||||
</test>
|
||||
<test>
|
||||
<testName>ICA-DOCKER-BASIC-TEST</testName>
|
||||
<testScript>
|
||||
</testScript>
|
||||
<testScriptps1>ICA-DOCKER-BASIC-TEST.ps1</testScriptps1>
|
||||
<setupType>SingleVM</setupType>
|
||||
<SupportedExecutionModes>AzureServiceManagement,AzureResourceManager</SupportedExecutionModes>
|
||||
<SubtestValues>SOME,TEXTS,NEEDS,TO,BE,PRESENT,HERE,FOR,PRINTING,TEST,SUMMARY</SubtestValues>
|
||||
<files>.\remote-scripts\azuremodules.sh</files>
|
||||
<TestParameters>
|
||||
</TestParameters>
|
||||
<Priority>P0</Priority>
|
||||
</test>
|
||||
<test>
|
||||
<testName>ICA-N-Series-GPU-TEST-NC6</testName>
|
||||
<testScript>
|
||||
|
@ -8766,7 +8779,13 @@
|
|||
<test>
|
||||
<Name>ICA-LTP-BASIC-TEST</Name>
|
||||
</test>
|
||||
</Cycle>
|
||||
</Cycle>
|
||||
<Cycle>
|
||||
<cycleName>DOCKER-BASIC</cycleName>
|
||||
<test>
|
||||
<Name>ICA-DOCKER-BASIC-TEST</Name>
|
||||
</test>
|
||||
</Cycle>
|
||||
<Cycle>
|
||||
<cycleName>GPU-BASIC</cycleName>
|
||||
<test>
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<#-------------Create Deployment Start------------------#>
|
||||
Import-Module .\TestLibs\RDFELibs.psm1 -Force
|
||||
$result = ""
|
||||
$testResult = ""
|
||||
$resultArr = @()
|
||||
$isDeployed = DeployVMS -setupType $currentTestData.setupType -Distro $Distro -xmlConfig $xmlConfig
|
||||
if ($isDeployed)
|
||||
{
|
||||
try
|
||||
{
|
||||
$clientVMData = $allVMData
|
||||
#region CONFIGURE VM FOR TERASORT TEST
|
||||
LogMsg "Test VM details :"
|
||||
LogMsg " RoleName : $($clientVMData.RoleName)"
|
||||
LogMsg " Public IP : $($clientVMData.PublicIP)"
|
||||
LogMsg " SSH Port : $($clientVMData.SSHPort)"
|
||||
#
|
||||
# PROVISION VMS FOR LISA WILL ENABLE ROOT USER AND WILL MAKE ENABLE PASSWORDLESS AUTHENTICATION ACROSS ALL VMS IN SAME HOSTED SERVICE.
|
||||
#
|
||||
ProvisionVMsForLisa -allVMData $allVMData -installPackagesOnRoleNames "none"
|
||||
#endregion
|
||||
|
||||
|
||||
#region EXECUTE TEST
|
||||
$StartScriptName = "test_docker.sh"
|
||||
RemoteCopy -uploadTo $clientVMData.PublicIP -port $clientVMData.SSHPort -files ".\remote-scripts\$StartScriptName" -username "root" -password $password -upload
|
||||
$out = RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "chmod +x $StartScriptName"
|
||||
$dockerOutput = RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "/root/$StartScriptName"
|
||||
#endregion
|
||||
|
||||
RemoteCopy -downloadFrom $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -download -downloadTo $LogDir -files "dockerServiceStatusLogs.txt"
|
||||
RemoteCopy -downloadFrom $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -download -downloadTo $LogDir -files "dockerVersion.txt"
|
||||
$dockerVersion = (Select-String -Path $LogDir\dockerVersion.txt -Pattern "Version")[0].Line.Trim().Split(":")[1].Trim()
|
||||
$goLangVersion = (Select-String -Path $LogDir\dockerVersion.txt -Pattern "Go version")[0].Line.Trim().Split(":")[1].Trim()
|
||||
|
||||
if ($dockerOutput -imatch "DOCKER_VERIFIED_SUCCESSFULLY")
|
||||
{
|
||||
$testResult = "PASS"
|
||||
}
|
||||
else
|
||||
{
|
||||
$testResult = "FAIL"
|
||||
}
|
||||
$testSummary = $null
|
||||
|
||||
$resultSummary += CreateResultSummary -testResult $dockerVersion -metaData "Docker Version" -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName
|
||||
$resultSummary += CreateResultSummary -testResult $goLangVersion -metaData "GoLang Version" -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName
|
||||
#endregion
|
||||
LogMsg "Test result : $testResult"
|
||||
LogMsg "Test Completed"
|
||||
}
|
||||
catch
|
||||
{
|
||||
$ErrorMessage = $_.Exception.Message
|
||||
LogMsg "EXCEPTION : $ErrorMessage"
|
||||
}
|
||||
Finally
|
||||
{
|
||||
$metaData = "DOCKER RESULT"
|
||||
if (!$testResult)
|
||||
{
|
||||
$testResult = "Aborted"
|
||||
}
|
||||
$resultArr += $testResult
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$testResult = "Aborted"
|
||||
$resultArr += $testResult
|
||||
}
|
||||
|
||||
$result = GetFinalResultHeader -resultarr $resultArr
|
||||
|
||||
#Clean up the setup
|
||||
DoTestCleanUp -result $result -testName $currentTestData.testName -deployedServices $isDeployed -ResourceGroups $isDeployed
|
||||
|
||||
#Return the result and summery to the test suite script..
|
||||
return $result, $resultSummary
|
|
@ -0,0 +1,19 @@
|
|||
# This script is meant for quick & easy install via:
|
||||
curl -fsSL get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
|
||||
systemctl status docker > /dev/null
|
||||
dockerServiceStatus=$?
|
||||
systemctl status docker > ./dockerServiceStatusLogs.txt
|
||||
docker version > dockerVersion.txt
|
||||
|
||||
if [ $dockerServiceStatus -eq 0 ];then
|
||||
echo "DOCKER_VERIFIED_SUCCESSFULLY"
|
||||
else
|
||||
echo "DOCKER_VERIFICATION_FAILED"
|
||||
fi
|
||||
|
||||
#TODO : More Tests
|
||||
|
||||
|
||||
#TODO Cleanup
|
Загрузка…
Ссылка в новой задаче