From d124b4c1d4eb29ffa2cdaae7874a6ab009c52750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 7 Jan 2021 10:47:51 -0500 Subject: [PATCH] elb_application_lb: test a rule based on http-header This should initially fail and be fixed the day https://github.com/ansible-collections/amazon.aws/pull/188 is merged. See: https://github.com/ansible-collections/amazon.aws/pull/187 See: https://github.com/ansible-collections/community.aws/issues/117 --- .../tasks/test_multiple_actions.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml b/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml index b04024811a0..19675e1c6a4 100644 --- a/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml +++ b/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml @@ -175,6 +175,22 @@ - Type: fixed-response FixedResponseConfig: "{{ FixedResponseActionConfig }}" Rules: + - Conditions: + - Field: http-header + HttpHeaderConfig: + Field: 'User-Agent' + Values: ['*Trident/7:0*rv:*'] + - Field: http-header + HttpHeaderConfig: + Field: 'X-Something' + Values: ['foobar'] + Priority: '1' + Actions: + - Type: fixed-response + FixedResponseConfig: + StatusCode: "200" + ContentType: "text/html" + MessageBody: "Hello World!" - Conditions: - Field: path-pattern Values: @@ -227,6 +243,22 @@ - Type: fixed-response FixedResponseConfig: "{{ FixedResponseActionConfig }}" Rules: + - Conditions: + - Field: http-header + HttpHeaderConfig: + HttpHeaderName: 'User-Agent' + Values: ['*Trident/7:0*rv:*'] + - Field: http-header + HttpHeaderConfig: + HttpHeaderName: 'X-Something' + Values: ['foobar'] + Priority: '1' + Actions: + - Type: fixed-response + FixedResponseConfig: + StatusCode: "200" + ContentType: "text/html" + MessageBody: "Hello World!" - Conditions: - Field: path-pattern Values: