Skip to content
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

Fix eks integration test failure #127

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_eks_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- "Fix bugs in the eks integration tests."
Copy link
Contributor

@mandar242 mandar242 Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "Fix bugs in the eks integration tests."
- "Fix bugs in the eks integration tests (https://github.com/ansible-collections/amazon.cloud/pull/127)."

4 changes: 2 additions & 2 deletions tests/integration/targets/eks/tasks/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
- include_tasks: set_facts.yml
- name: Delete IAM role
amazon.aws.iam_role:
name: "{{ _result_create_iam_role.role_name }}"
name: "{{ _result_create_iam_role.iam_role.role_name }}"
state: absent
ignore_errors: true

- name: Delete IAM role
amazon.aws.iam_role:
name: "{{ _result_create_iam_role_fp.role_name }}"
name: "{{ _result_create_iam_role_fp.iam_role.role_name }}"
state: absent
ignore_errors: true

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/eks/tasks/eks_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
endpoint_private_access: false
public_access_cidrs:
- 0.0.0.0/0
role_arn: "{{ _result_create_iam_role.arn }}"
role_arn: "{{ _result_create_iam_role.iam_role.arn }}"
tags:
Name: "{{ _resource_prefix }}-eks-cluster"
wait_timeout: 900
Expand Down
36 changes: 18 additions & 18 deletions tests/integration/targets/eks/tasks/eks_fargate_profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
fargate_profile_name: '{{ eks_fargate_profile_name_a }}'
state: present
cluster_name: fake_cluster
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results | selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -64,7 +64,7 @@
fargate_profile_name: fake_profile
cluster_name: '{{ eks_cluster_name }}'
state: absent
pod_execution_role_arn: '{{ _result_create_iam_role_fp.arn }}'
pod_execution_role_arn: '{{ _result_create_iam_role_fp.iam_role.arn }}'
subnets: >-
{{_result_create_subnets.results | selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -81,7 +81,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ _result_create_cluster.result.identifier }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results | selectattr('subnet.tags.Name', 'contains',
'public') | map(attribute='subnet.id') }}
Expand All @@ -101,7 +101,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -120,7 +120,7 @@
amazon.cloud.eks_fargate_profile:
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -134,7 +134,7 @@
amazon.cloud.eks_fargate_profile:
identifier: "{{ eks_cluster_name }}|{{ eks_fargate_profile_name_b }}"
state: present
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -149,7 +149,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -170,7 +170,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -191,7 +191,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -218,7 +218,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -241,7 +241,7 @@
amazon.cloud.eks_fargate_profile:
identifier: "{{ eks_cluster_name }}|{{ eks_fargate_profile_name_a }}"
state: present
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -263,7 +263,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results | selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -285,7 +285,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results | selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -308,7 +308,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -330,7 +330,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -351,7 +351,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_a }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -372,7 +372,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_b }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand All @@ -391,7 +391,7 @@
fargate_profile_name: "{{ eks_fargate_profile_name_b }}"
state: present
cluster_name: "{{ eks_cluster_name }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.arn }}"
pod_execution_role_arn: "{{ _result_create_iam_role_fp.iam_role.arn }}"
subnets: >-
{{_result_create_subnets.results|selectattr('subnet.tags.Name', 'contains',
'private') | map(attribute='subnet.id') }}
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/memorydb/aliases
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
slow

cloud/aws
Loading