Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
78985e5c
Commit
78985e5c
authored
May 19, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11030 from resmo/feature/cloudstack_tests_cs_portforward
cloudstack: add tests for cs_portforward
parents
5c6616dc
3916dc8f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
0 deletions
+118
-0
test/integration/cloudstack.yml
+1
-0
test/integration/roles/test_cs_portforward/defaults/main.yml
+3
-0
test/integration/roles/test_cs_portforward/meta/main.yml
+3
-0
test/integration/roles/test_cs_portforward/tasks/main.yml
+111
-0
No files found.
test/integration/cloudstack.yml
View file @
78985e5c
...
...
@@ -11,5 +11,6 @@
-
{
role
:
test_cs_securitygroup_rule
,
tags
:
test_cs_securitygroup_rule
}
-
{
role
:
test_cs_instance
,
tags
:
test_cs_instance
}
-
{
role
:
test_cs_instancegroup
,
tags
:
test_cs_instancegroup
}
-
{
role
:
test_cs_portforward
,
tags
:
test_cs_portforward
}
-
{
role
:
test_cs_account
,
tags
:
test_cs_account
}
-
{
role
:
test_cs_firewall
,
tags
:
test_cs_firewall
}
test/integration/roles/test_cs_portforward/defaults/main.yml
0 → 100644
View file @
78985e5c
---
cs_portforward_public_ip
:
"
10.100.212.5"
cs_portforward_vm
:
"
{{
cs_resource_prefix
}}-vm"
test/integration/roles/test_cs_portforward/meta/main.yml
0 → 100644
View file @
78985e5c
---
dependencies
:
-
test_cs_common
test/integration/roles/test_cs_portforward/tasks/main.yml
0 → 100644
View file @
78985e5c
---
-
name
:
setup
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
private_port
:
8080
state
:
absent
register
:
pf
-
name
:
verify setup
assert
:
that
:
-
pf|success
-
name
:
test fail if missing params
action
:
cs_portforward
register
:
pf
ignore_errors
:
true
-
name
:
verify results of fail if missing params
assert
:
that
:
-
pf|failed
-
'
pf.msg
==
"missing
required
arguments:
private_port,ip_address,public_port"'
-
name
:
test present port forwarding
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
vm
:
"
{{
cs_portforward_vm
}}"
private_port
:
8080
register
:
pf
-
name
:
verify results of present port forwarding
assert
:
that
:
-
pf|success
-
pf|changed
-
pf.vm_name == "{{ cs_portforward_vm }}"
-
pf.ip_address == "{{ cs_portforward_public_ip }}"
-
pf.public_port == 80
-
pf.public_end_port == 80
-
pf.private_port == 8080
-
pf.private_end_port == 8080
-
name
:
test present port forwarding idempotence
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
vm
:
"
{{
cs_portforward_vm
}}"
private_port
:
8080
register
:
pf
-
name
:
verify results of present port forwarding idempotence
assert
:
that
:
-
pf|success
-
not pf|changed
-
pf.vm_name == "{{ cs_portforward_vm }}"
-
pf.ip_address == "{{ cs_portforward_public_ip }}"
-
pf.public_port == 80
-
pf.public_end_port == 80
-
pf.private_port == 8080
-
pf.private_end_port == 8080
-
name
:
test change port forwarding
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
vm
:
"
{{
cs_portforward_vm
}}"
private_port
:
8888
register
:
pf
-
name
:
verify results of change port forwarding
assert
:
that
:
-
pf|success
-
pf|changed
-
pf.vm_name == "{{ cs_portforward_vm }}"
-
pf.ip_address == "{{ cs_portforward_public_ip }}"
-
pf.public_port == 80
-
pf.public_end_port == 80
-
pf.private_port == 8888
-
pf.private_end_port == 8888
-
name
:
test absent port forwarding
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
private_port
:
8888
state
:
absent
register
:
pf
-
name
:
verify results of absent port forwarding
assert
:
that
:
-
pf|success
-
pf|changed
-
pf.vm_name == "{{ cs_portforward_vm }}"
-
pf.ip_address == "{{ cs_portforward_public_ip }}"
-
pf.public_port == 80
-
pf.public_end_port == 80
-
pf.private_port == 8888
-
pf.private_end_port == 8888
-
name
:
test absent port forwarding idempotence
cs_portforward
:
ip_address
:
"
{{
cs_portforward_public_ip
}}"
public_port
:
80
private_port
:
8888
state
:
absent
register
:
pf
-
name
:
verify results of absent port forwarding idempotence
assert
:
that
:
-
pf|success
-
not pf|changed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment