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

[datadog_synthetics_test] Fix targetvalue for isUndefined json path assertions #1966

Merged
merged 4 commits into from
Jun 22, 2023

Conversation

romainberger
Copy link
Member

Fix for #1963, do not pass an empty targetvalue when the field is not provided.

@romainberger romainberger requested review from a team as code owners June 14, 2023 13:25
@romainberger romainberger force-pushed the rberger/synthetics-fix-jsonpath branch from d047413 to 6c29172 Compare June 14, 2023 13:30
@romainberger romainberger changed the title [datadog_synthetics_test] Fix optional targetvalue for json path assertions [datadog_synthetics_test] Fix targetvalue for isUndefined json path assertions Jun 14, 2023
} else {
if floatValue, err := strconv.ParseFloat(v.(string), 64); err == nil {
subTarget.SetTargetValue(floatValue)
if operator.(string) != "isUndefined" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can that be added to the switch instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@therve therve merged commit a4cd676 into master Jun 22, 2023
@therve therve deleted the rberger/synthetics-fix-jsonpath branch June 22, 2023 14:49
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