-
Notifications
You must be signed in to change notification settings - Fork 244
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
Show tags / versions when doing odo catalog list #558
Conversation
This will probably conflict with your PR @surajnarwade since we're modifying the same sections 👍 |
yeah @cdrage , this PR looks good to me though :) |
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.
Looks good to me and WFM as well
@cdrage , now we dont have conflicts between this and service catalog PR since both are two different commands now |
Looks good, but there are no tests :-( |
59a8aad
to
5dc99d1
Compare
Ready for review! @surajnarwade @kadel @ashetty1 @mik-dass @syamgk |
Tests looks good to me |
pkg/catalog/catalog_test.go
Outdated
|
||
// Function taken from occlient_test.go | ||
// fakeImageStream gets imagestream for the reactor | ||
func fakeImageStream(imageName string, namespace string, tags []string) *imagev1.ImageStream { |
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.
We should move these helper functions to a different file under occlient
package and just call them from there. WDYT? We could take up that exercise post PR merge too.
Cc: @kadel
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.
Yeah, I was trying to move them to fakeclient.go
or making them public within occlient_test.go
(which didn't work).
To be honest, I had to heavily modify these functions to work specifically for catalog list
(since I'm passing in tags []string
and modifying it. I would be more keen towards leaving them in the catalog_test.go
file.
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.
Those helper function should be moved to something like testingutil
pkg and merged into just one function, so we can share it between different tests.
Ideally in this PR 😬 If not then we should at least open new Issue so we don't forget to clean this.
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.
@kadel No worries, I'll move them to a testingutil pkg :)
When using `odo catalog list` the tags will now be listed: ``` github.com/redhat-developer/odo add-versioning ✗ 7d ⚑ ⍉ ▶ ./odo catalog list NAME TAGS dotnet 2.0,latest httpd 2.4,latest nginx 1.10,1.12,1.8,latest nodejs 0.10,4,6,8,latest perl 5.16,5.20,5.24,latest php 5.5,5.6,7.0,7.1,latest python 2.7,3.3,3.4,3.5,3.6,latest ruby 2.0,2.2,2.3,2.4,latest wildfly 10.0,10.1,8.1,9.0,latest ```
@kadel @surajnarwade @syamgk @ashetty1 @syamgk Tests have been moved to a different package. 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.
LGTM :)
LGTM |
@@ -0,0 +1,43 @@ | |||
package testingutil |
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.
wow! this way of separating function looks nice!
When using
odo catalog list
the tags will now be listed: