-
Notifications
You must be signed in to change notification settings - Fork 175
Add a nightly test for vicadmin tests on isolated vch #7793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
05ce7b8
Isolated VIC Admin tests
834c14f
Test update to nightly
8748551
Update docker params keyword use
9f158db
Use a common keyword for static deployment.
e9f99ad
Check container log size
cddd734
Specify client network route
a59194e
Fail to pull docker image
bc4e10d
Adjust keyword usage for handling arguments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
tests/manual-test-cases/Group5-Functional-Tests/5-28-VICAdmin-Isolated.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| Test 5-28 - VIC Admin Isolated | ||
| ======= | ||
|
|
||
| # Purpose: | ||
| Verify that VIC Admin can display logs on an isolated network with no wan connection. | ||
|
|
||
| # Environment: | ||
| This test requires that a vSphere environment be running and available, which dSwitch test-ds available. | ||
|
|
||
| # Test Steps: | ||
|
|
||
| 1. Create a DVS Port Group that does not have internet connectivity by setting a random vlan id | ||
| 2. Deploy VIC appliance to the vSphere server using the no-wan port group | ||
| 3. Verify login functions properly | ||
| 4. Verify vic admin internet connectivity status is showing a warning icon | ||
| 5. Pull the VCH-Init log and verify that it contains valid data | ||
| 6. Pull the Docker Personality log and verify that it contains valid data | ||
| 7. Create a container via the appliance | ||
| 8. Pull the container log bundle from the appliance and verify that it contains the new container's logs | ||
|
|
||
| # Test Cases: | ||
|
|
||
| ## Display HTML | ||
| 1. Log in | ||
| 2. Page displays vic-machine name in title | ||
|
|
||
| ## WAN Status Should Fail | ||
| 1. Log in | ||
| 2. Page displays warning symbols for wan connection status | ||
|
|
||
| ## Fail To Pull Docker Image | ||
| 1. Log in | ||
| 2. Pull docker busybox | ||
| 3. Fail to pull busybox | ||
|
|
||
| ## Get Portlayer Log | ||
| 1. Log in | ||
| 2. Portlayer Log access is allowed and logs are downloaded | ||
|
|
||
| ## Get VCH-Init Log | ||
| 1. Log in | ||
| 2. VCH-Init Log access is allowed and logs are downloaded | ||
|
|
||
| ## Get Docker Personality Log | ||
| 1. Log in | ||
| 2. Docker Personality Log access is allowed and logs are downloaded | ||
|
|
||
| ## Get VICAdmin Log | ||
| 1. Log in | ||
| 2. VICAdmin Log access is allowed and logs are downloaded |
99 changes: 99 additions & 0 deletions
99
tests/manual-test-cases/Group5-Functional-Tests/5-28-VICAdmin-Isolated.robot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # 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 | ||
| *** Settings *** | ||
| Documentation Test 5-28 - VICAdmin Isolated | ||
| Resource ../../resources/Util.robot | ||
| Suite Setup Deploy Testbed With Static IP | ||
| Suite Teardown Teardown VCH With No WAN | ||
| Default Tags | ||
|
|
||
| *** Keywords *** | ||
| Deploy Testbed With Static IP | ||
| Setup VC With No WAN | ||
| Deploy VCH With No WAN | ||
|
|
||
| Setup VC With No WAN | ||
| ${name}= Evaluate 'vic-5-28-' + str(random.randint(1000,9999)) modules=random | ||
| Wait Until Keyword Succeeds 10x 10m Create Simple VC Cluster With Static IP ${name} | ||
| Set Test Environment Variables | ||
|
|
||
| Log To Console Create a vch with a public network on a no-wan portgroup. | ||
|
|
||
| ${vlan}= Evaluate str(random.randint(1, 195)) modules=random | ||
|
|
||
| ${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 | ||
| Should Be Equal As Integers ${rc} 0 | ||
|
|
||
| Deploy VCH With No WAN | ||
| ${out}= Deploy VCH With No WAN Secret | ||
| Log ${out} | ||
| Get Docker Params ${out} ${false} | ||
|
|
||
| Deploy VCH With No WAN Secret | ||
| [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 | ||
| [Return] ${output} | ||
|
|
||
| Teardown VCH With No WAN | ||
| Run Keyword And Ignore Error Nimbus Cleanup ${list} | ||
|
|
||
| Login And Save Cookies | ||
| [Tags] secret | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN}/authentication -XPOST -F username=%{TEST_USERNAME} -F password=%{TEST_PASSWORD} -D /tmp/cookies-%{VCH-NAME} | ||
| Should Be Equal As Integers ${rc} 0 | ||
|
|
||
| *** 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} | ||
| Log ${output} | ||
| Should contain ${output} <title>VIC: %{VCH-NAME}</title> | ||
|
|
||
| WAN Status Should Fail | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN} -b /tmp/cookies-%{VCH-NAME} | ||
| Log ${output} | ||
| Should contain ${output} <div class="sixty">Registry and Internet Connectivity<span class="error-message"> | ||
|
|
||
| Fail To Pull Docker Image | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc and Output docker %{VCH-PARAMS} pull ${busybox} | ||
| Log ${output} | ||
| Should Be Equal As Integers ${rc} 1 | ||
| Should contain ${output} no route to host | ||
|
|
||
| Get Portlayer Log | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN}/logs/port-layer.log -b /tmp/cookies-%{VCH-NAME} | ||
| Log ${output} | ||
| Should contain ${output} Launching portlayer server | ||
|
|
||
| Get VCH-Init Log | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN}/logs/init.log -b /tmp/cookies-%{VCH-NAME} | ||
| Log ${output} | ||
| Should contain ${output} reaping child processes | ||
|
|
||
| Get Docker Personality Log | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN}/logs/docker-personality.log -b /tmp/cookies-%{VCH-NAME} | ||
| Log ${output} | ||
| Should contain ${output} docker personality | ||
|
|
||
| Get VICAdmin Log | ||
| Login And Save Cookies | ||
| ${rc} ${output}= Run And Return Rc And Output curl -sk %{VIC-ADMIN}/logs/vicadmin.log -b /tmp/cookies-%{VCH-NAME} | ||
| Log ${output} | ||
| Should contain ${output} Launching vicadmin pprof server | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log ${output}for all of these to assist in troubleshootingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.