Skip to content

Commit

Permalink
Remove superfluous calls to Set Test VCH Name (#7304)
Browse files Browse the repository at this point in the history
Several tests explicitly call the `Set Test VCH Name` keyword shortly
after calling `Set Test Environment Variables`.

This can lead to test failures when a VCH name collision occurs;
subsequent tests which re-use the VCH name fail because there may be
leftover certificates from the first VCH with that name.

`Set Test Environment Variables` itself calls `Set Test VCH Name` and
then cleans up old certificate directories. Therefore, the explicit
calls to `Set Test VCH Name` are both superfluous and problematic.
  • Loading branch information
zjs authored Feb 14, 2018
1 parent 3d1fe3f commit 9f66dc3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Suggest resources - Invalid datacenter
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name

Log To Console \nInstalling VCH to test server...
${output}= Run bin/vic-machine-linux create --name=%{VCH-NAME} --target=%{TEST_URL}/WOW --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --image-store=%{TEST_DATASTORE} --password=%{TEST_PASSWORD} ${vicmachinetls}
Expand All @@ -38,7 +37,6 @@ Suggest resources - Invalid target path
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name

Log To Console \nInstalling VCH to test server...
${output}= Run bin/vic-machine-linux create --name=%{VCH-NAME} --target=%{TEST_URL}/MUCH/DATACENTER --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --image-store=%{TEST_DATASTORE} --password=%{TEST_PASSWORD} ${vicmachinetls}
Expand All @@ -51,7 +49,6 @@ Create VCH - target thumbprint verification
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name

${output}= Run bin/vic-machine-linux create --thumbprint=NOPE --name=%{VCH-NAME} --target="%{TEST_USERNAME}:%{TEST_PASSWORD}@%{TEST_URL}" --image-store=ENOENT ${vicmachinetls}
Should Contain ${output} thumbprint does not match
Expand All @@ -63,7 +60,6 @@ Default image datastore
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name

Log To Console \nInstalling VCH to test server...
${output}= Run bin/vic-machine-linux create --name=%{VCH-NAME} --target=%{TEST_URL} --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --password=%{TEST_PASSWORD} ${vicmachinetls} --insecure-registry harbor.ci.drone.local
Expand All @@ -88,7 +84,6 @@ Custom image datastore
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name

Log To Console \nInstalling VCH to test server...
${output-esx}= Run Keyword If '%{HOST_TYPE}' == 'ESXi' Run bin/vic-machine-linux create --name=%{VCH-NAME} --target=%{TEST_URL} --thumbprint=%{TEST_THUMBPRINT} --user=%{TEST_USERNAME} --password=%{TEST_PASSWORD} --image-store=%{TEST_DATASTORE}/long/weird/path ${vicmachinetls} --insecure-registry harbor.ci.drone.local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Image Store Delete - Image store not found
# Attempt to cleanup old/canceled tests
Run Keyword And Ignore Error Cleanup Dangling VMs On Test Server
Run Keyword And Ignore Error Cleanup Datastore On Test Server
Set Test VCH Name
${output}= Run rm -rf %{VCH-NAME}

Log To Console \nInstalling VCH to test server...
${output}= Run bin/vic-machine-linux create --name=%{VCH-NAME} --target=%{TEST_URL} --user=%{TEST_USERNAME} --bridge-network=%{BRIDGE_NETWORK} --public-network=%{PUBLIC_NETWORK} --image-store=%{TEST_DATASTORE}/images --password=%{TEST_PASSWORD} --force --kv
Expand Down

0 comments on commit 9f66dc3

Please sign in to comment.