-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support fortest cases for as custom iso (#8381)
* Add two test cases for centos-6.9 as custom iso Two centos6.9 cases into Group26-Custom-ISO: network and volume. The network test verifying port mapping and container network. The volume test is just copied from 1-19-Docekr-Volume-Create. Both test cases require a vch with custom-isos.
- Loading branch information
Showing
5 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 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
28 changes: 28 additions & 0 deletions
28
tests/test-cases/Group1-Docker-Commands/1-45-Docker-Container-Network.md
This file contains 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,28 @@ | ||
Test 1-45 - Docker Container Network | ||
==================================== | ||
|
||
# Purpose: | ||
To verify that when containerVM is based on custom iso, the tomcat | ||
application on docker hub works as expected on VIC. And verify that | ||
tomcat on vic-specific container-network works as expected. | ||
|
||
# References: | ||
[1 - Docker Hub tomcat Official Repository](https://hub.docker.com/_/tomcat/) | ||
|
||
# Environment: | ||
This test requires that a vSphere server is running and available | ||
|
||
# Test Steps: | ||
1. Deploy VIC appliance to the vSphere server with custom iso as containerVM | ||
2. Run an tomcat container with a mapped port and verify the server is up and running: | ||
`docker run --name tomcat1 -d -p 8080:8080 tomcat:alpine` | ||
3. Run an tomcat container on the specific container network: | ||
`docker run --name tomcat2 -d --net=public tomcat:alpine` | ||
4. Run an tomcat container with a mapped port on the specific container network: | ||
`docker run --name tomcat3 -d -p 8083:8080 --net=public tomcat:alpine` | ||
|
||
# Expected Outcome: | ||
* Each step should succeed, tomcat should be running without error in each case | ||
|
||
# Possible Problems: | ||
None |
51 changes: 51 additions & 0 deletions
51
tests/test-cases/Group1-Docker-Commands/1-45-Docker-Container-Network.robot
This file contains 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,51 @@ | ||
# 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 1-45 - Docker Container Network | ||
Resource ../../resources/Util.robot | ||
Suite Setup Install VIC Appliance To Test Server additional-args=--container-network-firewall=%{PUBLIC_NETWORK}:open | ||
Suite Teardown Cleanup VIC Appliance On Test Server | ||
Default Tags | ||
|
||
*** Keywords *** | ||
Curl tomcat endpoint | ||
[Arguments] ${endpoint} | ||
${rc} ${output}= Run And Return Rc And Output curl ${endpoint} | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
*** Test Cases *** | ||
Tomcat with port mapping | ||
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --name tomcat1 -d -p 8082:8080 tomcat:alpine | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 0 | ||
${output}= Wait Until Keyword Succeeds 10x 10s Curl tomcat endpoint %{VCH-IP}:8082 | ||
Should Contain ${output} Apache Tomcat | ||
|
||
Tomcat in container-network | ||
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --name tomcat2 -d --net=public tomcat:alpine | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 0 | ||
${ip}= Get Container IP %{VCH-PARAMS} tomcat2 public | ||
${output}= Wait Until Keyword Succeeds 10x 10s Curl tomcat endpoint ${ip}:8080 | ||
Should Contain ${output} Apache Tomcat | ||
|
||
Tomcat with port mapping in container-network | ||
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} run --name tomcat3 -d -p 8083:8080 --net=public tomcat:alpine | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 0 | ||
${ip}= Get Container IP %{VCH-PARAMS} tomcat3 public | ||
${output}= Wait Until Keyword Succeeds 10x 10s Curl tomcat endpoint ${ip}:8083 | ||
Should Contain ${output} Apache Tomcat |
This file contains 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