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

datasource: fix test for invalid method #13199

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

lbajolet-hashicorp
Copy link
Contributor

Since the expected error to look for in the output is compiled to a regexp, the [] from the error message were interpreted as a set of characters, which made the regexp not match the expected output from the command.
So to avoid this problem, we escape them so they are expected verbatim in the command output.

Since the expected error to look for in the output is compiled to a
regexp, the `[]` from the error message were interpreted as a set of
characters, which made the regexp not match the expected output from the
command.
So to avoid this problem, we escape them so they are expected verbatim
in the command output.
Copy link
Contributor

@JenGoldstrich JenGoldstrich left a comment

Choose a reason for hiding this comment

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

LGTM

datasource/http/data_acc_test.go Show resolved Hide resolved
The acceptance tests for the HTTP datasource had a `Outputs` attribute
for checking the output of the command for a specific regexp pattern.
As pointed out, given the expectative nature of the attribute, naming it
`Outputs` did not make the intent clear, so we rename it to
`ExpectedOutputs` with this commit.
@lbajolet-hashicorp lbajolet-hashicorp merged commit 35d1490 into main Nov 4, 2024
11 checks passed
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix_http_datasource_acctest branch November 4, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants