Add a nightly test for vicadmin tests on isolated vch#7793
Add a nightly test for vicadmin tests on isolated vch#77938 commits merged intomasterfrom unknown repository
Conversation
| @@ -0,0 +1,101 @@ | |||
| # Copyright 2016-2017 VMware, Inc. All Rights Reserved. | |||
| ${dvs}= Run govc find -type DistributedVirtualSwitch | head -n1 | ||
| ${rc} ${output}= Run And Return Rc And Output govc dvs.portgroup.add -vlan=${vlan} -dvs ${dvs} dpg-no-wan | ||
|
|
||
| ${output}= Run bin/vic-machine-linux create --debug 1 --name=%{VCH-NAME} --target=%{TEST_URL}%{TEST_DATACENTER} --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --image-store=%{TEST_DATASTORE} --password=%{TEST_PASSWORD} --force=true --compute-resource=%{TEST_RESOURCE} --no-tlsverify --bridge-network=%{BRIDGE_NETWORK} --management-network=%{PUBLIC_NETWORK} --client-network=%{PUBLIC_NETWORK} --client-network-ip &{static}[ip]/&{static}[netmask] --client-network-gateway &{static}[gateway] --public-network dpg-no-wan --public-network-ip 192.168.100.2/24 --public-network-gateway 192.168.100.1 --dns-server 10.170.16.48 --insecure-registry wdc-harbor-ci.eng.vmware.com |
There was a problem hiding this comment.
I think you want to use Install VIC Appliance To Test Server (from VCH-Util), which supports a ${additional-args} argument (for passing the arguments it doesn't handle by default).
This has a few mostly-minor benefits:
- It will verify that the command was successful (in a consistent way)
- It will log the output so that you can debug the failure
- It will only access
%{TEST_PASSWORD}in asecretkeyword, so it's not logged - It will take care of calling
Get Docker Paramsfor you
There was a problem hiding this comment.
Good idea, however, it does not support overriding the --client-network/ip/gateway args.
There was a problem hiding this comment.
Ah, that's too bad. In that case I think you'll want to tag your Deploy VCH With No WAN keyword with secret because it's using %{TEST_PASSWORD}.
|
|
||
| Get Docker Params ${output} ${false} | ||
|
|
||
| Set Environment Variable VIC-ADMIN %{VCH-IP}:2378 |
There was a problem hiding this comment.
I think this is handled by Get Docker Params
| Log ${output} | ||
| ${rc} ${output}= Run And Return Rc and Output ls -l /tmp/${vmName}/vmware.log | ||
| Should Be Equal As Integers ${rc} 0 | ||
| ${rc} ${output}= Run And Return Rc and Output ls -l /tmp/${vmName}/tether.debug |
There was a problem hiding this comment.
Can we also assert that these log files aren't empty?
tests/resources/Nimbus-Util.robot
Outdated
| Log To Console Starting Static IP Address test... | ||
| Set Suite Variable ${NIMBUS_LOCATION} NIMBUS_LOCATION=wdc | ||
| Run Keyword And Ignore Error Nimbus Cleanup ${list} ${false} | ||
| ${name}= Evaluate 'vic-5-26-' + str(random.randint(1000,9999)) modules=random |
There was a problem hiding this comment.
This is specific to test 5-26, need to make it abstract.
tests/resources/Nimbus-Util.robot
Outdated
|
|
||
| Static IP Address Create | ||
| [Timeout] 110 minutes | ||
| Log To Console Starting Static IP Address test... |
There was a problem hiding this comment.
Update comment to not refer test as this is keyword.
tests/resources/Nimbus-Util.robot
Outdated
| ${out}= Execute Command poweroff -d 0 -f | ||
| Close connection | ||
|
|
||
| Static IP Address Create |
There was a problem hiding this comment.
I would rename this keyword to something like Create Simple VC Cluster Testbed With Static IP
| Setup VCH With No WAN | ||
| Deploy VCH With No WAN | ||
|
|
||
| Setup VCH With No WAN |
There was a problem hiding this comment.
I see this is setting up VC and not VCH, so would rename it to Setup VC With No WAN
mdharamadas1
left a comment
There was a problem hiding this comment.
Few comments but good test coverage!
| *** Test Cases *** | ||
| Display HTML | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN} -b /tmp/cookies-%{VCH-NAME} |
There was a problem hiding this comment.
Log ${output} for all of these to assist in troubleshooting
| Run Keyword And Ignore Error Nimbus Cleanup ${list} ${false} | ||
| ${name}= Evaluate 'vic-5-26-' + str(random.randint(1000,9999)) modules=random | ||
| ${out}= Deploy Nimbus Testbed %{NIMBUS_USER} %{NIMBUS_PASSWORD} --noSupportBundles --plugin testng --vcvaBuild ${VC_VERSION} --esxBuild ${ESX_VERSION} --testbedName vic-simple-cluster --testbedSpecRubyFile /dbc/pa-dbc1111/mhagen/nimbus-testbeds/testbeds/vic-simple-cluster.rb --runName ${name} | ||
|
|
|
|
||
| Deploy VCH With No WAN | ||
| [Tags] secret | ||
| ${output}= Run bin/vic-machine-linux create --debug 1 --name=%{VCH-NAME} --target=%{TEST_URL}%{TEST_DATACENTER} --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --image-store=%{TEST_DATASTORE} --password=%{TEST_PASSWORD} --force=true --compute-resource=%{TEST_RESOURCE} --no-tlsverify --bridge-network=%{BRIDGE_NETWORK} --management-network=%{PUBLIC_NETWORK} --client-network=%{PUBLIC_NETWORK} --client-network-ip &{static}[ip]/&{static}[netmask] --client-network-gateway 10.0.0.0/8:&{static}[gateway] --public-network dpg-no-wan --public-network-ip 192.168.100.2/24 --public-network-gateway 192.168.100.1 --dns-server 10.170.16.48 --insecure-registry wdc-harbor-ci.eng.vmware.com |
There was a problem hiding this comment.
I suggest moving this line to a separate secret keyword like Deploy VCH With No WAN Secret that returns output and remove secret from this one so that we can log the returned create output
|
[skip ci] needs to be in the the header |
|
Also need to add 5-28 to |
|
In fact , sync up with @mhagen-vmware about #7724 , you might want to change your test number to 5-29 |
|
No need to worry about my unmerged work, I will rebase and renumber whenever I can get that in |
|
Passing the affected tests: |
Adds a nightly test that verifies vicadmin functions properly without a wan connection. Fixes vmware#7102. (cherry picked from commit d5135e4)
…8151) Adds a nightly test that verifies vicadmin functions properly without a wan connection. Fixes vmware#7102. (cherry picked from commit d5135e4)
Fixes #7102
Adds a nightly test that: