Skip to content

Commit

Permalink
Fix ec2_eni integration tests - ensure VM state
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Oct 6, 2021
1 parent 46ff6d8 commit 9b02123
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tests/integration/targets/ec2_eni/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
unstable

cloud/aws

ec2_eni_info
12 changes: 10 additions & 2 deletions tests/integration/targets/ec2_eni/tasks/test_attachment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ============================================================
- name: Ensure test instances are running
# If we don't stop the instances they can get stuck "detaching"
- name: Ensure test instances are stopped
ec2_instance:
state: running
state: stopped
instance_ids:
- "{{ instance_id_1 }}"
- "{{ instance_id_2 }}"
Expand Down Expand Up @@ -174,6 +175,13 @@
- '"currently in use" in result.msg'

# ============================================================
- name: Ensure test instances is running (will block non-forced detachment)
ec2_instance:
state: running
instance_ids:
- "{{ instance_id_2 }}"
wait: True

- name: delete an attached network interface with force_detach
ec2_eni:
force_detach: True
Expand Down

0 comments on commit 9b02123

Please sign in to comment.