-
Notifications
You must be signed in to change notification settings - Fork 626
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
test/cloudflare_record: Fix acceptance LOC tests #217
test/cloudflare_record: Fix acceptance LOC tests #217
Conversation
This updates the `resourceCloudflareRecordRead` function to also run the `data` attribute through the `transformToCloudflareDNSData` function (like the `Create`/`Update` already do) in order to correctly parse the floats that are returned as strings. Fixes the following CI failure ``` ------- Stdout: ------- === RUN TestAccCloudflareRecord_LOC === PAUSE TestAccCloudflareRecord_LOC === CONT TestAccCloudflareRecord_LOC --- FAIL: TestAccCloudflareRecord_LOC (2.98s) testing.go:527: Step 0 error: Check failed: Check 2/4 error: cloudflare_record.foobar: Attribute 'value' expected "37 46 46.000 N 122 23 35.000 W 0m 100m 0m 0m", got "37 46 46.000 N 122 23 35.000 W 0.00m 100.00m 0.00m 0.00m" FAIL ```
This gets all the Cloudflare record acceptance tests passing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks 👍
@@ -8,6 +8,7 @@ IMPROVEMENTS: | |||
|
|||
BUG FIXES: | |||
|
|||
* resource/cloudflare_record: Ensure `Create`/`Update`/`Read` functions all apply the record transformation and store the correct state values [GH-217] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but we usually modify Changelog after merging PRs, via the GitHub UI (pencil icon). It helps us to avoid conflicts in case we merge other PRs whilst one is being reviewed.
This updates the
resourceCloudflareRecordRead
function to also run thedata
attribute through thetransformToCloudflareDNSData
function(like the
Create
/Update
already do) in order to correctly parse thefloats that are returned as strings.
I've opened a discussion with the Cloudflare folks on fixing this
properly (not passing the floats as strings) in the response but I
suspect that won't be a quick fix and this will need to suffice while we
are working through that.
Fixes the following CI failure
FYI @radeksimko