Skip to content

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Feb 14, 2025

Description

What is the difference in between https://github.com/kubernetes-sigs/external-dns/blob/master/provider/aws/aws_test.go and this approach?

  • I'm proposing to add a fixture based approach from files. This augment/enchance current unit-testing capabilities. With this addition, the fixture based tests focus on testing certain fixtures and abstracting provider configuration. Aka focus on test and not on setup of this tests

Example pull request #5058, it improves batching functionality, but it's quite challenging to create a setup of 100+ zones as example.

Example bug #3718 not strictly related, but nice to have more variations of domains, as domain filters have they own logic, plus on top there is a bit of provider specific implementation

Example bug #4549 where external-dns behave differently when number of zones and records is ~1000

Checklist

  • Unit tests updated
  • End user documentation updated

Signed-off-by: ivan katliarchuk <[email protected]>
* master:
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(deps): bump the dev-dependencies group across 1 directory with 21 updates
  test(domain-filter): simple filters on domain exclusion (kubernetes-sigs#5064)
  chore(deps): bump nosborn/github-action-markdown-cli
  ci(docs): add markdown linters and editorconfig (kubernetes-sigs#5055)
  docs: update and refactor contribution part (kubernetes-sigs#5073)
  fix(chart): update rbac for F5 transportserver source (kubernetes-sigs#5066)
  fix(chart): non-string types on svcaccount annotations (kubernetes-sigs#5067)
  Update aws.md
  fix: expand tabs in ClouDNS entry
  fix alignment
  feat(docs): add ClouDNS webhook provider to readme
  chore(filter-tags): pre-process tags
  chore(deps): bump the dev-dependencies group across 1 directory with 22 updates
  Fix:If multiple targets are part of an OCI provider record operation, create a new record for each target.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 14, 2025
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 14, 2025
@ivankatliarchuk
Copy link
Contributor Author

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 14, 2025
@mloiseleur
Copy link
Collaborator

It's clearly easier this way, it LVGTM.
Would you please detail what is the purpose of provider/aws/aws_testdoubles_test.go ?

@mloiseleur
Copy link
Collaborator

/retitle test(aws): introduce first fixture-based

@k8s-ci-robot k8s-ci-robot changed the title chor(aws-provider): tests fixtures test(aws): introduce first fixture-based Feb 14, 2025
@ivankatliarchuk
Copy link
Contributor Author

The solor purpose is to logically separate a specific implementation of mocks or other testing constructs that we use in testing, from a testing, sort of test utils. Is not strictly required, I could add it to a fixture_test. What's the preference is?

@mloiseleur
Copy link
Collaborator

sort of test utils.

Then would you please name it accordingly ?

What's the preference is?

My main concern is that should be named accordingly with its purpose. I do not have a strong opinion of where it should go.

@ivankatliarchuk
Copy link
Contributor Author

Got it. renamed to aws_utils_test.go' or aws_fixture_itils_test.gois more appropriate?_test` suffix is required to isolate from production code though

@mloiseleur
Copy link
Collaborator

Sounds good, thanks 👍
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mloiseleur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2025
@k8s-ci-robot k8s-ci-robot merged commit 73c2f33 into kubernetes-sigs:master Feb 14, 2025
13 checks passed
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 15, 2025
* master: (27 commits)
  test(aws): introduce first fixture-based (kubernetes-sigs#5092)
  chore(makefile): add helper and document targets
  feat: Updated chart for v1.15.2 release
  chore(makefile): add helper and document targets
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(deps): bump the dev-dependencies group across 1 directory with 21 updates
  test(domain-filter): simple filters on domain exclusion (kubernetes-sigs#5064)
  chore(deps): bump nosborn/github-action-markdown-cli
  ci(docs): add markdown linters and editorconfig (kubernetes-sigs#5055)
  Address PR comments
  docs: update and refactor contribution part (kubernetes-sigs#5073)
  fix(chart): update rbac for F5 transportserver source (kubernetes-sigs#5066)
  fix(chart): non-string types on svcaccount annotations (kubernetes-sigs#5067)
  Update aws.md
  fix: expand tabs in ClouDNS entry
  fix alignment
  feat(docs): add ClouDNS webhook provider to readme
  chore(filter-tags): pre-process tags
  ...
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 16, 2025
* master: (33 commits)
  docs(proposal): support multiple replicas with leader election (kubernetes-sigs#5051)
  feat(chart): automate helm json schema (kubernetes-sigs#5075)
  test(aws): introduce first fixture-based (kubernetes-sigs#5092)
  chore(makefile): add helper and document targets
  feat: Updated chart for v1.15.2 release
  chore(makefile): add helper and document targets
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(deps): bump the dev-dependencies group across 1 directory with 21 updates
  test(domain-filter): simple filters on domain exclusion (kubernetes-sigs#5064)
  chore(deps): bump nosborn/github-action-markdown-cli
  ci(docs): add markdown linters and editorconfig (kubernetes-sigs#5055)
  Address PR comments
  docs: update and refactor contribution part (kubernetes-sigs#5073)
  fix(chart): update rbac for F5 transportserver source (kubernetes-sigs#5066)
  fix(chart): non-string types on svcaccount annotations (kubernetes-sigs#5067)
  Update aws.md
  fix: expand tabs in ClouDNS entry
  fix alignment
  ...
@ivankatliarchuk ivankatliarchuk deleted the chore-aws-tests-fixtures branch February 16, 2025 14:28
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 18, 2025
* master: (97 commits)
  chore(formatting): fix infected files with correct formatting (kubernetes-sigs#5099)
  docs: Fix managed-record-type argument
  docs(proposal): support multiple replicas with leader election (kubernetes-sigs#5051)
  feat(chart): automate helm json schema (kubernetes-sigs#5075)
  docs(proposal): update proposal template, add statuses
  test(aws): introduce first fixture-based (kubernetes-sigs#5092)
  chore(makefile): add helper and document targets
  feat: Updated chart for v1.15.2 release
  chore(makefile): add helper and document targets
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(deps): bump the dev-dependencies group across 1 directory with 21 updates
  test(domain-filter): simple filters on domain exclusion (kubernetes-sigs#5064)
  chore(deps): bump nosborn/github-action-markdown-cli
  ci(docs): add markdown linters and editorconfig (kubernetes-sigs#5055)
  Address PR comments
  docs: update and refactor contribution part (kubernetes-sigs#5073)
  fix(chart): update rbac for F5 transportserver source (kubernetes-sigs#5066)
  fix(chart): non-string types on svcaccount annotations (kubernetes-sigs#5067)
  ...
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Feb 19, 2025
* master: (31 commits)
  fix(source): debug log on gateway target detection
  Update docs/sources/service.md
  chore(formatting): fix infected files with correct formatting (kubernetes-sigs#5099)
  docs: Fix managed-record-type argument
  Update docs/sources/service.md
  docs(proposal): support multiple replicas with leader election (kubernetes-sigs#5051)
  fixed golangci-lint config
  updated MD files
  updated MD files
  feat(chart): automate helm json schema (kubernetes-sigs#5075)
  docs(proposal): update proposal template, add statuses
  test(aws): introduce first fixture-based (kubernetes-sigs#5092)
  chore(makefile): add helper and document targets
  feat: Updated chart for v1.15.2 release
  chore(makefile): add helper and document targets
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(filter-tags): pre-process filter tags
  chore(deps): bump the dev-dependencies group across 1 directory with 21 updates
  update service.md, service.go
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants