-
Notifications
You must be signed in to change notification settings - Fork 13
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
fixes : #1177 support variable values on open libery alizer's port de… #111
base: main
Are you sure you want to change the base?
Conversation
…tection Signed-off-by: Horiodino <[email protected]>
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've left a minor comment. Overall looks good to me, I only think we should keep the existing flow of testing and simply add more test cases in the component_recognizer_test.go
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.
Overall I like the changes :) just left 1 comment regarding adding a few more test cases to cover all scenarios
|
||
ctx := context.TODO() | ||
|
||
t.Run("Hardcoded Ports", func(t *testing.T) { |
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.
Is it possible to add a test case for a mix of hardcoded and variable based ports?
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.
Possibly one for empty var as well?
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.
+1 on the suggested test cases, as mentioned in #111 (comment) I'd prefer following the https://github.com/devfile/alizer/blob/main/test/apis/component_recognizer_test.go#L159-L161 example as the format of the tests.
/ok-to-test |
Signed-off-by: Horiodino <[email protected]>
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
@Horiodino for the check status to pass, you'll need to commit the updates from go mod tidy
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.
lgtm with the one comment about running go mod tidy
@@ -17,6 +17,7 @@ require ( | |||
golang.org/x/mod v0.20.0 | |||
gopkg.in/yaml.v2 v2.4.0 | |||
gopkg.in/yaml.v3 v3.0.1 | |||
gotest.tools 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.
Just need to run go mod tidy
as @thepetk mentioned
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Horiodino, Jdubrick, thepetk 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 |
Description of Changes
resolves the port value by checking if it is a variable and if it is, it returns the value of the variable
Related Issue(s)
devfile/api#1177
Acceptance Criteria
Testing and documentation do not need to be complete in order for this PR to be approved. However, tracking issues must be opened for missing testing/documentation.
Unit/Functional tests
Documentation
Tests Performed
✔️️ Added suitable test case based on Issue.
How To Test
Instructions for the reviewer on how to test your changes.
Notes To Reviewer
Any notes you would like to include for the reviewer.