-
Notifications
You must be signed in to change notification settings - Fork 175
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
use designated domains in tests (RFC2606) #274
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #274 +/- ##
==========================================
- Coverage 55.28% 50.72% -4.57%
==========================================
Files 9 8 -1
Lines 624 483 -141
==========================================
- Hits 345 245 -100
+ Misses 234 201 -33
+ Partials 45 37 -8 ☔ View full report in Codecov by Sentry. |
oh! found some more; hold on a minute hm.. also interested why CI fails; need to check |
Hum yes it seems path query is not taken into account anymore https://github.com/docker/docker-credential-helpers/actions/runs/5098464489/jobs/9165620051?pr=274#step:7:66
|
It should exact match properly though
|
Yeah; want to give it a look indeed. Also change these tests into subtests probably |
d65e2ae
to
1337780
Compare
(only addressed the "found some more" - not looked at the failures yet) |
1337780
to
614056f
Compare
I rebased this PR on top of the other PR that adds subtests;
The test that's failing uses the same domain and path as the test before it, but differs in query parameters docker-credential-helpers/wincred/wincred_windows_test.go Lines 195 to 196 in f09e79d
And the test is using a test-table, which adds the credentials as part of the table for each test, but does not delete the credentials after testing; docker-credential-helpers/wincred/wincred_windows_test.go Lines 213 to 235 in f09e79d
I wonder if the issue is if
The docker-credential-helpers/osxkeychain/osxkeychain_darwin.go Lines 35 to 37 in f09e79d
The docker-credential-helpers/wincred/wincred_windows.go Lines 16 to 26 in f09e79d
Some of the other tests call a
So, I suspect what happens is that;
|
wincred/wincred_windows_test.go
Outdated
// {url: "https://foobar.example.com:2376/some/other/path"}, | ||
{url: "https://foobar.example.com:2376/some/other/path?foo=bar"}, |
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.
Right, so skipping one of the tests makes CI pass, so it's indeed due to state left behind from the previous test in the test-table, and it looks like that's a bug somewhere (see my comment)
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.
Can you try with foo.com
instead of example.com
?
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.
Can try when I'm back at my keyboard.
You're thinking it may be because docker.io
sorts before example.com
or something?
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 was looking at the API for the Credential
structure: https://learn.microsoft.com/en-us/windows/win32/api/wincred/ns-wincred-credentiala and go-winres conversion https://github.com/danieljoos/wincred/blob/c3ce29ad62ec1f6a3ef4a35c83b8d52346779c15/conversion.go#L74-L116 and smth looks off but not sure what atm. Was also comparing with wincred handling in Git https://github.com/git/git/blob/79bdd48716a4c455bdc8ffd91d57a18d5cd55baa/contrib/credential/wincred/git-credential-wincred.c#L157-L187 but need to take a closer look.
5b501f2
to
7239abf
Compare
7239abf
to
50fdece
Compare
50fdece
to
c02f1be
Compare
Update domains used in tests to used domains that are designated for this purpose as described in [RFC2606, section 3][1] [1]: https://www.rfc-editor.org/rfc/rfc2606.html#section-3 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This reverts commit c02f1be. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
834fe12
to
b737c5a
Compare
Update domains used in tests to used domains that are designated for this
purpose as described in RFC2606, section 3