Skip to content

Commit

Permalink
Merge pull request #127 from GomathiselviS/fix_tests
Browse files Browse the repository at this point in the history
Fix eks integration test failure
  • Loading branch information
GomathiselviS authored Jul 29, 2024
2 parents 39a7ea3 + 9bf60c8 commit 98368dc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
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."
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

0 comments on commit 98368dc

Please sign in to comment.