From 117f21563a7ae7d1641f4c830a99659588464d61 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 26bcf2c28f1..346f1cadd7c 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 @@ -159,6 +159,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: @@ -210,6 +226,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: