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
9878ebf0
Commit
9878ebf0
authored
Jan 16, 2015
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for rax instance_ids with state=absent
parent
340b845c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
7 deletions
+54
-7
test/integration/roles/test_rax/tasks/main.yml
+54
-7
No files found.
test/integration/roles/test_rax/tasks/main.yml
View file @
9878ebf0
...
...
@@ -748,11 +748,11 @@
region
:
"
{{
rackspace_region
}}"
image
:
"
{{
rackspace_image_id
}}"
flavor
:
"
{{
rackspace_flavor
}}"
name
:
"
{{
resource_prefix
}}-1
0
-%03d"
name
:
"
{{
resource_prefix
}}-1
1
-%03d"
count
:
2
count_offset
:
10
exact_count
:
true
group
:
"
{{
resource_prefix
}}-1
0
"
group
:
"
{{
resource_prefix
}}-1
1
"
wait
:
true
register
:
rax
...
...
@@ -764,24 +764,24 @@
-
rax.action == 'create'
-
rax.instances|length == 2
-
rax.instances == rax.success
-
rax.instances|map(attribute='rax_name')|unique|list|sort == ['{{ resource_prefix }}-1
0-010', '{{ resource_prefix }}-10
-011']
-
rax.instances|map(attribute='rax_name')|unique|list|sort == ['{{ resource_prefix }}-1
1-010', '{{ resource_prefix }}-11
-011']
-
name
:
"
Test
delete
integration
1
0
"
-
name
:
"
Test
delete
integration
1
1
"
rax
:
username
:
"
{{
rackspace_username
}}"
api_key
:
"
{{
rackspace_api_key
}}"
region
:
"
{{
rackspace_region
}}"
image
:
"
{{
rackspace_image_id
}}"
flavor
:
"
{{
rackspace_flavor
}}"
name
:
"
{{
resource_prefix
}}-1
0
-%03d"
name
:
"
{{
resource_prefix
}}-1
1
-%03d"
count
:
0
count_offset
:
10
exact_count
:
true
group
:
"
{{
resource_prefix
}}-1
0
"
group
:
"
{{
resource_prefix
}}-1
1
"
wait
:
true
register
:
rax
-
name
:
"
Validate
delete
integration
1
0
"
-
name
:
"
Validate
delete
integration
1
1
"
assert
:
that
:
-
rax|success
...
...
@@ -790,3 +790,50 @@
-
rax.success|length == 2
-
not rax.instances
# ============================================================
# ============================================================
-
name
:
Test rax instance_ids absent 1 (create)
rax
:
username
:
"
{{
rackspace_username
}}"
api_key
:
"
{{
rackspace_api_key
}}"
region
:
"
{{
rackspace_region
}}"
image
:
"
{{
rackspace_image_id
}}"
flavor
:
"
{{
rackspace_flavor
}}"
name
:
"
{{
resource_prefix
}}-12"
wait
:
true
register
:
rax
-
name
:
Validate rax instance_ids absent 1 (create)
assert
:
that
:
-
rax|success
-
rax|changed
-
rax.action == 'create'
-
rax.instances|length == 1
-
rax.instances[0].name == "{{ resource_prefix }}-12"
-
rax.instances[0] == rax.success[0]
-
rax.instances[0].rax_status == 'ACTIVE'
-
name
:
Test rax instance_ids absent 2 (delete)
rax
:
username
:
"
{{
rackspace_username
}}"
api_key
:
"
{{
rackspace_api_key
}}"
region
:
"
{{
rackspace_region
}}"
image
:
"
{{
rackspace_image_id
}}"
flavor
:
"
{{
rackspace_flavor
}}"
instance_ids
:
-
"
{{
rax.success.0.rax_id
}}"
state
:
absent
wait
:
true
register
:
rax2
-
name
:
Validate rax instance_ids absent 2 (delete)
assert
:
that
:
-
rax2|success
-
rax2|changed
-
rax2.action == 'delete'
-
rax2.success.0.rax_id == rax.success.0.rax_id
# ============================================================
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