-
Couldn't load subscription status.
- Fork 881
fetcher: fix dependency issue, new test TestImageDependencies + disco #1822
Conversation
|
I updated the scenario to the exact one in #1752 and I can reproduce it:
|
ada3898 to
262eb02
Compare
|
Rebased with the last changes from appc/spec#551 |
tests/rkt_image_dependencies_test.go
Outdated
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.
This change probably won't be necessary, when the appriopriate change in appc/spec lands, right?
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.
You're right. This one: "discovery: add port parameter" appc/spec#110
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.
PR filed on Jan 13 😅
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.
Ah, no. It probably can be dropped, when we have the discovery over custom port implemented in spec.
262eb02 to
2a234b6
Compare
|
@krnowak branch updated |
rkt/images.go
Outdated
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.
Because we are secure by default! Oh, wait...
;)
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.
Jokes aside, we should add an insecure flag for allowing http connections and use it here. There was even an issue about this, right?
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 filed one: #1836
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.
and added a comment referencing the issue
2a234b6 to
1c7ebe8
Compare
|
Thanks for the review. Branch updated. I also fixed some comments. |
1c7ebe8 to
44527d8
Compare
|
depends on:
|
44527d8 to
eca48b8
Compare
5047afc to
01a0017
Compare
|
The new appc/spec has been vendored in #1861. Labels "do not merge" and "dependency/appc spec" removed. Rebased and ready for review. |
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.
Maybe handle the case, when serverURL is nil. Like panic when it is nil, with some useful message instead of getting a nil dereference error.
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.
done
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.
Where?
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 mean - the serverURL variable is accessed below without any prior nil checks.
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.
Oops.
Done.
|
Some nits, otherwise LFAD. |
01a0017 to
a6c113d
Compare
|
Updated. |
tests/rkt_auth_test.go
Outdated
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 serverHandler function needs to be moved too.
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.
done
|
More nits. |
a6c113d to
38604da
Compare
|
Updated again |
tests/rkt_image_dependencies_test.go
Outdated
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.
This defer should be placed before ioutil.WriteFile.
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.
done
|
One final nit. Sorry for not spotting it earlier. :) |
Test inspired by rkt#1752
38604da to
cb99078
Compare
|
LFAD. |
fetcher: fix dependency issue, new test TestImageDependencies + disco
fetch: allow duplicate dependencies in the dependency tree
Fixes #1752
Includes a new test TestImageDependencies that could reproduce the bug. The test run an image discovery on a local https server (port 443) with the appropriate insecure option.
I cannot run the test on http because httptest waits forever when using
httptest.Start() on a non-random port, see:
https://golang.org/src/net/http/httptest/server.go?s=2768:2792#L112
And I have to use the non-random port 443: I need standard https port because
of #375 (comment)