Skip to content

Fix Changeset normalization#260

Merged
tra0x merged 2 commits intomainfrom
tra0x/fix-cloudflare-normalization
Nov 4, 2024
Merged

Fix Changeset normalization#260
tra0x merged 2 commits intomainfrom
tra0x/fix-cloudflare-normalization

Conversation

@tra0x
Copy link
Contributor

@tra0x tra0x commented Nov 4, 2024

Normalization has been incorporated into the Changeset class, where diffs are calculated. Since providers are solely responsible for retrieving current records and do not participate in the diff calculations, it was not feasible to limit normalization to just the Cloudflare provider alone.

@tra0x tra0x force-pushed the tra0x/fix-cloudflare-normalization branch 3 times, most recently from 6074b1b to 2e3d547 Compare November 4, 2024 19:35
tra0x added 2 commits November 4, 2024 14:36
Cloudflare API returns records with lowercase names and values.
This commit normalizes the zone file records before comparing them.
@tra0x tra0x force-pushed the tra0x/fix-cloudflare-normalization branch from 2e3d547 to c6fad20 Compare November 4, 2024 19:38
@tra0x tra0x marked this pull request as ready for review November 4, 2024 19:44

assert_kind_of(Record::PTR, record)
assert_equal('host.record-store-dns-tests.shopitest.com.', record.ptrdname)
assert_equal('tbnbz2ni.byoip.example.com.', record.ptrdname)
Copy link
Contributor

Choose a reason for hiding this comment

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

I was expecting to see one test with capital letters like TBnbz2ni... no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that would be this test

@tra0x tra0x merged commit a0d1389 into main Nov 4, 2024
@tra0x tra0x deleted the tra0x/fix-cloudflare-normalization branch November 4, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants