This commit is contained in:
Nidylei 2015-11-25 15:51:59 +08:00
Родитель 8ab3b7f047
Коммит 483eebb39c
3 изменённых файлов: 91 добавлений и 0 удалений

Просмотреть файл

@ -2566,6 +2566,18 @@
<SupportedExecutionModes>AzureServiceManagement,AzureResourceManager</SupportedExecutionModes>
<TestID>AzureBVT_025</TestID>
</test>
<test>
<testName>BVT-VERIFY-RHUI-DOWNLOAD</testName>
<testScript>BVT-VERIFY-RHUI-DOWNLOAD.sh</testScript>
<testScriptPs1>BVT-VERIFY-RHUI-DOWNLOAD.ps1</testScriptPs1>
<files>.\remote-scripts\package-download-test.sh,.\remote-scripts\BVT-VERIFY-RHUI-DOWNLOAD.sh</files>
<setupType>BVTDeployment</setupType>
<TestType></TestType>
<TestFeature></TestFeature>
<SupportedExecutionModes>AzureServiceManagement,AzureResourceManager</SupportedExecutionModes>
<TestID>AzureBVT_025</TestID>
</test>
<test>
<testName>NETWORK-OUTBOUND-ACCESS-IPERF-DTAP-UDP</testName>
<TestMode>IP</TestMode>

Просмотреть файл

@ -0,0 +1,71 @@
<#-------------Create Deployment Start------------------#>
Import-Module .\TestLibs\RDFELibs.psm1 -Force
$result = ""
$testResult = ""
$resultArr = @()
$isDeployed = DeployVMS -setupType $currentTestData.setupType -Distro $Distro -xmlConfig $xmlConfig
if ($isDeployed)
{
try
{
$hs1VIP = $AllVMData.PublicIP
$hs1vm1sshport = $AllVMData.SSHPort
$hs1ServiceUrl = $AllVMData.URL
$hs1vm1Dip = $AllVMData.InternalIP
$DistroName = DetectLinuxDistro -VIP $hs1VIP -SSHport $hs1vm1sshport -testVMUser $user -testVMPassword $password
if ($DistroName -eq "REDHAT")
{
RemoteCopy -uploadTo $hs1VIP -port $hs1vm1sshport -files $currentTestData.files -username $user -password $password -upload
RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "chmod +x *" -runAsSudo
LogMsg "Executing : $($currentTestData.testScript)"
RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "bash $($currentTestData.testScript)" -runAsSudo -runMaxAllowedTime 1800
RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "mv /var/log/package-download-test.log $($currentTestData.testScript).log" -runAsSudo
RemoteCopy -download -downloadFrom $hs1VIP -files "/home/$user/state.txt, /home/$user/Summary.log, /home/$user/$($currentTestData.testScript).log" -downloadTo $LogDir -port $hs1vm1sshport -username $user -password $password
$testResult = Get-Content $LogDir\Summary.log
$testStatus = Get-Content $LogDir\state.txt
LogMsg "Test result : $testResult"
}
else
{
LogMsg "The Distro is not Redhat, skip the test!"
$testResult = 'PASS'
$testStatus = 'TestCompleted'
}
if ($testStatus -eq "TestCompleted")
{
LogMsg "Test Completed"
}
}
catch
{
$ErrorMessage = $_.Exception.Message
LogMsg "EXCEPTION : $ErrorMessage"
}
Finally
{
$metaData = ""
if (!$testResult)
{
$testResult = "Aborted"
}
$resultArr += $testResult
#$resultSummary += CreateResultSummary -testResult $testResult -metaData $metaData -checkValues "PASS,FAIL,ABORTED" -testName $currentTestData.testName# if you want to publish all result then give here all test status possibilites. if you want just failed results, then give here just "FAIL". You can use any combination of PASS FAIL ABORTED and corresponding test results will be published!
}
}
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

Просмотреть файл

@ -0,0 +1,8 @@
#!/bin/bash
./package-download-test.sh
if [[ $? == 0 ]]; then
echo 'PASS' > Summary.log
else
echo 'FAIL' > Summary.log
fi
echo 'TestCompleted' > state.txt