Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7d8eedd
Update DRS test to our new non-drs support (#7765) (#8151)
mhagen-vmware Apr 17, 2018
e13795c
Add retry on vSAN DOM objects in DS check (#7792) (#8151)
Apr 19, 2018
87f782e
Add vSAN DOM check retry for vSAN Complex test (#7799) (#8151)
Apr 20, 2018
c7ff9b3
Add nightly for vicadmin tests on isolated vch (#7793) (#8151)
Apr 24, 2018
22662a5
Fix setup/teardown in opsuser tests (#7836) (#8151)
jzt Apr 25, 2018
26a741a
nightly: Disable 5-25-OPS-User-Grant upgrade test (#7863) (#8151)
zjs May 1, 2018
41140c9
Nimbus testbed for nfs volume nightly test (#7853) (#8151)
rajanashok May 1, 2018
7e7a351
Use 1.3.1 in ops user upgrade test (#8151)
jzt May 1, 2018
3057da1
Fix several tests that did not appropriately use the vic-admin env va…
mhagen-vmware May 2, 2018
b8c0173
Update the nightlies builds (#7883) (#8151)
mhagen-vmware May 3, 2018
f30e517
Configure ROBO nightlies with Group19-DRS-Disabled (#7876) (#8151)
May 3, 2018
b463224
Add timeouts in case of hung operations (#7884) (#8151)
mhagen-vmware May 3, 2018
246796f
New testbed for multiple cluster test (#7888) (#8151)
mhagen-vmware May 4, 2018
d887fc9
Switch to testbed for NFS Datastore test (#7900) (#8151)
mhagen-vmware May 4, 2018
0cd4c2f
VCH install timeout set to 30m for 5-21-Datastore-Path (#7902) (#8151)
May 4, 2018
9099872
Add NFS datastore keyword back (#7906) (#8151)
mhagen-vmware May 7, 2018
b904d1b
Select correct datastore for the test (#7909) (#8151)
mhagen-vmware May 8, 2018
4dfcaa6
Create a new testbed that includes a static IP address worker (#7918)…
mhagen-vmware May 8, 2018
e9836e2
Add ping to NFS Volume nightly tests (#7821) (#8151)
andrewtchin May 11, 2018
41df355
Fix VSAN testbed for 6.7 testing (#7971) (#8151)
mhagen-vmware May 21, 2018
a50da2d
Improving 21-1-Whitelist Test -Harbor Setup (#7997) (#8151)
singhshwetaQE May 29, 2018
450ec92
fix harbor-util (#8011) (#8151)
singhshwetaQE May 30, 2018
4d141d1
Parameterize nightly job script (#8047) (#8151)
hickeng Jun 15, 2018
366f354
Preserve quoting in test runner script (#8060) (#8151)
hickeng Jun 16, 2018
1e32fa2
Integration test script refinement and fixes (#8063) (#8151)
hickeng Jun 16, 2018
3c6ad7b
Additional fixes to integration tests (#8069) (#8151)
hickeng Jun 19, 2018
a9147f3
Updates to suite&dvs retry logic, increased predictability (#8074) (#…
hickeng Jun 21, 2018
4244997
Update vsphere build numbers for scenario tests (#8136) (#8151)
hickeng Jul 10, 2018
018ae80
Scenario tests run on 6.0u3 instead of 6.0u3e (#8139) (#8151)
hickeng Jul 12, 2018
22eac05
Fix tar extraction path in DRS-disabled nightlies (#7889) (#8151)
May 3, 2018
b9180ea
Add test for no-DRS VCH create with RP options (#7881) (#8151)
May 4, 2018
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
81 changes: 81 additions & 0 deletions tests/drs-disabled/jenkins-drs-disabled-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/bash
# Copyright 2018 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
input=$(gsutil ls -l gs://vic-engine-builds/vic_* | grep -v TOTAL | sort -k2 -r | head -n1 | xargs | cut -d ' ' -f 3 | cut -d '/' -f 4)

n=0
until [ $n -ge 5 ]
do
echo "Retry.. $n"
echo "Downloading gcp file $input"
wget https://storage.googleapis.com/vic-engine-builds/$input
if [ -f "$input" ]
then
echo "File found.."
break
else
echo "File NOT found"
fi
n=$[$n+1]
sleep 15
done

n=0
until [ $n -ge 5 ]
do
mkdir vic/bin
echo "Extracting .tar.gz"
tar xvzf $input -C vic/bin --strip 1
if [ -f "vic/bin/vic-machine-linux" ]
then
echo "tar extraction complete.."
canContinue="Yes"
break
else
echo "tar extraction failed"
canContinue="No"
rm -rf vic/bin
fi
n=$[$n+1]
sleep 15
done

if [[ $canContinue = "No" ]]; then
echo "Tarball extraction failed..quitting the run"
break
else
echo "Tarball extraction passed, Running nightlies test.."
fi

# Run the Robot tests in a container
envfile="vic-internal/drs-disabled-secrets.list"
image="gcr.io/eminent-nation-87317/vic-integration-test:1.48"
cmd="pabot --processes 1 --removekeywords TAG:secret -d drs-disabled tests/manual-test-cases/Group19-DRS-Disabled"
docker run --rm -v $PWD/vic:/go --env-file $envfile $image $cmd

# Remove the VIC binary tar file
rm $input

cat vic/drs-disabled/pabot_results/*/stdout.txt | grep -E '::|\.\.\.' | grep -E 'PASS|FAIL' > console.log

# Format the email output for Jenkins
sed -i -e 's/^/<br>/g' console.log
sed -i -e 's|PASS|<font color="green">PASS</font>|g' console.log
sed -i -e 's|FAIL|<font color="red">FAIL</font>|g' console.log

# Run the log upload script in a container
cmd="tests/drs-disabled/upload-logs.sh"
docker run --rm -e BUILD_TIMESTAMP -v $PWD/vic:/go --env-file $envfile $image $cmd

56 changes: 56 additions & 0 deletions tests/drs-disabled/upload-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
# Copyright 2016-2018 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

echo "Upload drs-disabled test logs"

set -x
gsutil version -l
set +x

outfile="vic_drs_disabled_logs_"$BUILD_TIMESTAMP".zip"
echo $outfile

/usr/bin/zip -9 -r $outfile drs-disabled *.zip *.log *.debug *.tgz

# GC credentials
keyfile=~/vic-drs-disabled-logs.key
botofile=~/.boto
if [ ! -f $keyfile ]; then
echo -en $GS_PRIVATE_KEY > $keyfile
chmod 400 $keyfile
fi
if [ ! -f $botofile ]; then
echo "[Credentials]" >> $botofile
echo "gs_service_key_file = $keyfile" >> $botofile
echo "gs_service_client_id = $GS_CLIENT_EMAIL" >> $botofile
echo "[GSUtil]" >> $botofile
echo "content_language = en" >> $botofile
echo "default_project_id = $GS_PROJECT_ID" >> $botofile
fi

if [ -f "$outfile" ]; then
gsutil cp $outfile gs://vic-drs-disabled-logs
echo "----------------------------------------------"
echo "Download test logs here:"
echo "https://console.cloud.google.com/m/cloudstorage/b/vic-drs-disabled-logs/o/$outfile?authuser=1"
echo "----------------------------------------------"
else
echo "No log output file to upload"
fi

if [ -f "$keyfile" ]; then
rm -f $keyfile
fi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 13-1 - vMotion VCH Appliance
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Create a VSAN Cluster vic-vmotion-13-1
Suite Setup Nimbus Suite Setup Create a VSAN Cluster vic-vmotion-13-1
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Run Keyword If Test Failed Gather All vSphere Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 13-2 - vMotion Container
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Create a VSAN Cluster vic-vmotion-13-2
Suite Setup Nimbus Suite Setup Create a VSAN Cluster vic-vmotion-13-2
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Test Teardown Run Keyword If Test Failed Gather All vSphere Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ Teardown VCH And Cleanup Nimbus
Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Test Cases ***

# TODO(jzt): we need to test against a single ESX host

Simple Placement
Set Environment Variable GOVC_URL ${vc1-ip}
Set Environment Variable TEST_URL_ARRAY ${vc1-ip}
Set Environment Variable TEST_RESOURCE cls3
# TODO(anchal): these are currently set to the static testbed in the secrets file.
# Set Environment Variable GOVC_URL ${vc1-ip}
# Set Environment Variable TEST_URL_ARRAY ${vc1-ip}
# Set Environment Variable TEST_RESOURCE cls3

Set Environment Variable TEST_TIMEOUT 30m

Log To Console Deploy VIC to the VC cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,26 @@ Test 19-4 - DRS Disabled License Features
=======

# Purpose:
To verify that the license and feature checks required for a ROBO Advanced environment are displayed and updated on VCH Admin.
To verify that vic-machine create checks for the DRS setting and command flags specific to resource pools in a vSphere environment without DRS, such as a ROBO deployment. If a VCH is being installed in a DRS-disabled environment, vic-machine create should warn that DRS is disabled and mention that any resource pool options supplied in the command will be ignored as they are not applicable in this environment.

# References:
1. [vSphere Remote Office and Branch Office](http://www.vmware.com/products/vsphere/remote-office-branch-office.html)
2. [Provide License and Feature Check](https://github.com/vmware/vic/issues/7277)
3. [vic-admin to report on license and feature compliance](https://github.com/vmware/vic/issues/7276)
3. [vic-machine to provide license and feature check](https://github.com/vmware/vic/issues/7275)

# Environment:
This test requires access to VMware Nimbus cluster for dynamic ESXi and vCenter creation. This test should be executed in the following topologies and should have vSAN enabled.
* 1 vCenter host with 3 clusters, where 1 cluster has 1 ESXi host and the other 2 clusters have 3 ESXi hosts each
* 2 vCenter hosts connected with ELM, where each vCenter host has a cluster/host/datacenter topology that emulates a customer environment (exact topology TBD)
This test requires access to VMware Nimbus cluster for dynamic ESXi and vCenter creation. This test should be executed in a vCenter environment with a cluster that has DRS turned off.

See https://confluence.eng.vmware.com/display/CNA/VIC+ROBO for more details.

# Test Steps:
1. Deploy a ROBO Advanced vCenter testbed for both environments above
2. Install a VCH on vCenter
3. Visit the VCH Admin page and verify that the License and Feature Status sections show that required license and features are present
4. Assign a more restrictive license such as ROBO Standard or Standard that does not have the required features (VDS, VSPC) to vCenter
5. Assign the above license to each of the hosts within the vCenter cluster
6. Refresh the VCH Admin page and verify that the License and Feature Status sections show that required license and features are not present
7. Delete the VCH
1. Deploy a vCenter testbed with DRS disabled
2. Using vic-machine create, install a VCH with compute resource set to the cluster where DRS is off. Also supply options that are specific to resource pools: cpu, cpu-shares, cpu-reservation, memory, memory-shares and memory-reservation.
3. Delete the VCH

# Expected Outcome:
* All test steps should complete without error
* Step 2's output should contain a message stating that DRS is disabed and that the provided resource pool options will be ignored.

# Possible Problems:
None
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2018 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

*** Settings ***
Documentation Test 19-4 - DRS-Disabled-License-Features
Resource ../../resources/Util.robot
Suite Teardown Cleanup VIC Appliance On Test Server

*** Test Cases ***
vic-machine create checks DRS setting and RP options
Set Environment Variable TEST_TIMEOUT 30m

${output}= Install VIC Appliance To Test Server additional-args=--memory 8000 --memory-reservation 512 --memory-shares 6000 --cpu 10000 --cpu-reservation 512 --cpu-shares high
Should Contain ${output} DRS is recommended, but is disabled
Should Contain ${output} Memory Limit
Should Contain ${output} Memory Reservation
Should Contain ${output} Memory Shares
Should Contain ${output} CPU Limit
Should Contain ${output} CPU Reservation
Should Contain ${output} CPU Shares
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Documentation Test 21-01 - Whitelist
Resource ../../resources/Util.robot
Resource ../../resources/Harbor-Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Setup Harbor
Suite Setup Nimbus Suite Setup Setup Harbor
Suite Teardown Nimbus Cleanup ${list} ${false}
Test Teardown Run Keyword If Test Failed Cleanup VIC Appliance On Test Server

Expand All @@ -42,6 +42,7 @@ Setup Harbor
Simple ESXi Setup

# Install a Harbor server with HTTPS a Harbor server with HTTP
Run Keyword and Ignore Error Remove File ${HARBOR_VERSION}.ova
Install Harbor To Test Server protocol=https name=harbor-https
Set Environment Variable HTTPS_HARBOR_IP %{HARBOR-IP}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 21-2 - Artifactory
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Artifactory Setup
Suite Setup Nimbus Suite Setup Artifactory Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-1 - Distributed Switch
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Distributed Switch Setup
Suite Setup Nimbus Suite Setup Distributed Switch Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Variables ***
Expand Down Expand Up @@ -62,7 +62,7 @@ Distributed Switch Setup
:FOR ${IDX} IN RANGE ${esx_number}
\ ${out}= Run govc host.add -hostname=@{esx_ips}[${IDX}] -username=root -dc=${datacenter} -password=${NIMBUS_ESX_PASSWORD} -noverify=true
\ Should Contain ${out} OK
\ Wait Until Keyword Succeeds 5x 15 seconds Add Host To Distributed Switch @{esx_ips}[${IDX}]
\ Add Host To Distributed Switch @{esx_ips}[${IDX}]

Log To Console Deploy VIC to the VC cluster
Set Environment Variable TEST_URL_ARRAY ${vc_ip}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*** Settings ***
Documentation Test 5-10 - Multiple Datacenters
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Multiple Datacenter Setup
Suite Setup Nimbus Suite Setup Multiple Datacenter Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}

*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,66 +15,47 @@
*** Settings ***
Documentation Test 5-11 - Multiple Clusters
Resource ../../resources/Util.robot
Suite Setup Wait Until Keyword Succeeds 10x 10m Multiple Cluster Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup ${list}
Suite Setup Nimbus Suite Setup Multiple Cluster Setup
Suite Teardown Run Keyword And Ignore Error Nimbus Cleanup Single VM '*5-11-multiple-cluster*' ${false}
Test Teardown Cleanup VIC Appliance On Test Server

*** Keywords ***
# Insert elements from dict2 into dict1, overwriting conflicts in dict1 & returning new dict
Combine Dictionaries
[Arguments] ${dict1} ${dict2}
${dict2keys}= Get Dictionary Keys ${dict2}
:FOR ${key} IN @{dict2keys}
\ ${elem}= Get From Dictionary ${dict2} ${key}
\ Set To Dictionary ${dict1} ${key} ${elem}
[Return] ${dict1}

Multiple Cluster Setup
[Timeout] 110 minutes
Run Keyword And Ignore Error Nimbus Cleanup ${list} ${false}
&{esxes}= Create Dictionary
${num_of_esxes}= Evaluate 2
:FOR ${i} IN RANGE 3
# Deploy some ESXi instances
\ &{new_esxes}= Deploy Multiple Nimbus ESXi Servers in Parallel ${num_of_esxes} %{NIMBUS_USER} %{NIMBUS_PASSWORD}
\ ${esxes}= Combine Dictionaries ${esxes} ${new_esxes}

# Investigate to see how many were actually deployed
\ ${len}= Get Length ${esxes}
\ ${num_of_esxes}= Evaluate ${num_of_esxes} - ${len}

# Exit if we've got enough & continue loop if we don't
\ Exit For Loop If ${len} >= 2
\ Log To Console Only got ${len} ESXi instance(s); Trying again

@{esx-names}= Get Dictionary Keys ${esxes}
@{esx-ips}= Get Dictionary Values ${esxes}
${esx1}= Get From List ${esx-names} 0
${esx2}= Get From List ${esx-names} 1
${esx1-ip}= Get From List ${esx-ips} 0
${esx2-ip}= Get From List ${esx-ips} 1

${esx3} ${esx4} ${esx5} ${vc} ${esx3-ip} ${esx4-ip} ${esx5-ip} ${vc-ip}= Create a Simple VC Cluster datacenter1 cls1
Set Suite Variable @{list} ${esx1} ${esx2} ${esx3} ${esx4} ${esx5} %{NIMBUS_USER}-${vc}

Log To Console Create cluster2 on the VC
${out}= Run govc cluster.create cls2
Should Be Empty ${out}
${out}= Run govc cluster.add -hostname=${esx1-ip} -username=root -dc=datacenter1 -cluster=cls2 -password=e2eFunctionalTest -noverify=true
Should Contain ${out} OK

Log To Console Create cluster3 on the VC
${out}= Run govc cluster.create cls3
Should Be Empty ${out}
${out}= Run govc cluster.add -hostname=${esx2-ip} -username=root -dc=datacenter1 -cluster=cls3 -password=e2eFunctionalTest -noverify=true
Should Contain ${out} OK
Run Keyword And Ignore Error Nimbus Cleanup Single VM '*5-11-multiple-cluster*' ${false}
Log To Console \nStarting testbed deploy...
${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} spec=vic-multiple-cluster.rb args=--noSupportBundles --plugin testng --vcvaBuild ${VC_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-multiple-cluster --runName 5-11-multiple-cluster
Log ${out}

Open Connection %{NIMBUS_GW}
Wait Until Keyword Succeeds 10 min 30 sec Login %{NIMBUS_USER} %{NIMBUS_PASSWORD}
${vc-ip}= Get IP 5-11-multiple-cluster.vc.0
Close Connection

Log To Console Set environment variables up for GOVC
Set Environment Variable GOVC_URL ${vc-ip}
Set Environment Variable GOVC_USERNAME Administrator@vsphere.local
Set Environment Variable GOVC_PASSWORD Admin\!23

Log To Console Deploy VIC to the VC cluster
Set Environment Variable TEST_URL_ARRAY ${vc-ip}
Set Environment Variable TEST_USERNAME Administrator@vsphere.local
Set Environment Variable TEST_PASSWORD Admin\!23
Set Environment Variable BRIDGE_NETWORK bridge
Set Environment Variable PUBLIC_NETWORK vm-network
Remove Environment Variable TEST_DATACENTER
Set Environment Variable TEST_TIMEOUT 15m
Set Environment Variable TEST_RESOURCE cls

# Get one of the hosts in the cluster we want and make sure we use the correct local datastore
${hosts}= Run govc ls -t HostSystem host/cls
@{hosts}= Split To Lines ${hosts}
${datastore}= Get Name of First Local Storage For Host @{hosts}[0]
Set Environment Variable TEST_DATASTORE "${datastore}"

*** Test Cases ***
Test
Log To Console \nStarting test...


Install VIC Appliance To Test Server certs=${false} vol=default

Run Regression Tests

Cleanup VIC Appliance On Test Server
Loading