-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Improve Cloudflare tests in preparation to fix other issues #1537
Improve Cloudflare tests in preparation to fix other issues #1537
Conversation
/assign @Raffo |
38f9f5d
to
2c4c92e
Compare
I needed to make one change to make tests deterministic (iterate over sorted keys of map) |
b658b40
to
c52028a
Compare
Or never mind, I've used DomainFilter to make tests deterministic instead. This is again test-only PR |
c52028a
to
8f29194
Compare
cbb84be
to
2aa5c78
Compare
done. could someone review this? these are test-only changes |
2aa5c78
to
497e883
Compare
@@ -33,6 +33,7 @@ require ( | |||
github.com/linki/instrumented_http v0.2.0 | |||
github.com/linode/linodego v0.3.0 | |||
github.com/mattn/go-isatty v0.0.11 // indirect | |||
github.com/maxatome/go-testdeep v1.4.0 |
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.
The changes are good, but I do have a question: is there a way to avoid adding a dependency just for testing?
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.
I don't think so :( This dependency is very important as all tests are using it. The error messages with it are very clear, and anything else would be either not readable or would require massive amount of code which would be practically duplicating what this dependency already does. Is it big issue?
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.
Afaik test dependencies don't affect production binary size itself
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Raffo, sheerun 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 |
This PR is first stepping stone to implement fix for #1514. It improves test suite in a way that documents current behavior in tests and will allow to change it in the future. Changes are:
-run
flagprovider/provider_test.go
so it's easier to see test errorsnewCloudFlareChanges
)I hope because this PR modifies only tests, it will be quick to review and merge. After that I can start working on fix of #1514 so it will modify much less core and will be easier to review