-
Notifications
You must be signed in to change notification settings - Fork 36
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
287-format pod container port name #51
Merged
yangcao77
merged 6 commits into
devfile:master
from
yangcao77:287-formatPodContainerPortName
Jan 15, 2021
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bc08a6c
modified convertPort()
yangcao77 04e1965
update to use latest api repo and latest schema
yangcao77 b64790a
Merge branch 'master' of github.com:devfile/library into 287-formatPo…
yangcao77 dc087b1
modify import
yangcao77 d1a5b24
modify test to match schema
yangcao77 811bcb2
address review comments
yangcao77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,13 @@ import ( | |
"strings" | ||
"testing" | ||
|
||
"github.com/devfile/api/pkg/attributes" | ||
"github.com/devfile/api/v2/pkg/attributes" | ||
"github.com/devfile/library/pkg/devfile/parser" | ||
"github.com/devfile/library/pkg/devfile/parser/data/v2/common" | ||
"github.com/devfile/library/pkg/testingutil" | ||
buildv1 "github.com/openshift/api/build/v1" | ||
|
||
v1 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" | ||
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" | ||
|
||
corev1 "k8s.io/api/core/v1" | ||
"k8s.io/apimachinery/pkg/api/resource" | ||
|
@@ -108,13 +108,14 @@ func TestConvertPorts(t *testing.T) { | |
}, | ||
want: []corev1.ContainerPort{ | ||
{ | ||
Name: endpointsNames[0], | ||
Name: "8080-tcp", | ||
ContainerPort: int32(endpointsPorts[0]), | ||
Protocol: "TCP", | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: "Case 2: Multiple env vars", | ||
name: "Case 2: Multiple endpoints", | ||
endpoints: []v1.Endpoint{ | ||
{ | ||
Name: endpointsNames[0], | ||
|
@@ -127,12 +128,14 @@ func TestConvertPorts(t *testing.T) { | |
}, | ||
want: []corev1.ContainerPort{ | ||
{ | ||
Name: endpointsNames[0], | ||
Name: "8080-tcp", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noticed, can you update teh test case name, it seems wrong There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
ContainerPort: int32(endpointsPorts[0]), | ||
Protocol: "TCP", | ||
}, | ||
{ | ||
Name: endpointsNames[1], | ||
Name: "9090-tcp", | ||
ContainerPort: int32(endpointsPorts[1]), | ||
Protocol: "TCP", | ||
}, | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
thinking if we should call these aliases
devfileApiv2
🤔 it will be less confusing as well