Case insensitive assert #801
-
Hey, Looking at the following test suite, provided by oshp is it possible to have those assertions to be case insensitive - name: Strict-Transport-Security
steps:
- type: http
method: GET
url: '{{.target_site}}'
skip_body: true
timeout: '{{.request_timeout_in_seconds}}'
assertions:
- result.statuscode ShouldEqual 200
- result.headers.Strict-Transport-Security ShouldNotBeNil
- result.headers.Strict-Transport-Security ShouldEqual "max-age=31536000; includeSubDomains" Validate |
Beta Was this translation helpful? Give feedback.
Answered by
ivan-velasco
Jul 19, 2024
Replies: 1 comment 1 reply
-
@AviranAbady You could introduce a new assertion to handle the changing characters. Here's an approach if you know which characters will change: assertions:
- result.statuscode ShouldEqual 200
- result.headers.Strict-Transport-Security ShouldNotBeNil
- or:
- result.headers.Strict-Transport-Security ShouldEqual "max-age=31536000; includeSubDomains"
- result.headers.Strict-Transport-Security ShouldEqual "Max-age=31536000; IncludeSubDomains" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AviranAbady
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AviranAbady You could introduce a new assertion to handle the changing characters. Here's an approach if you know which characters will change: