-
Notifications
You must be signed in to change notification settings - Fork 867
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
feat: Add name attribute to ServicePort #2572
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6cd8202
Add name attribute to ServicePort
daniddelrio 9d1b667
Format with gofmt
daniddelrio ce7d56a
Update experiment test by adding port name
daniddelrio cd1c970
Include port name only when given
daniddelrio 1821988
Implement separate e2e tests for single unnamed port and two named ports
daniddelrio eba9bf1
Merge branch 'master' into named-experiment-ports
daniddelrio 912ca6c
Remove port name in experiment_test.go
daniddelrio 7b2a96a
Merge branch 'master' into named-experiment-ports
daniddelrio 96a9313
Replace Sleep in new multiport service experiment
daniddelrio 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
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -99,6 +99,23 @@ func (s *ExperimentSuite) TestExperimentWithServiceAndScaleDownDelay() { | |||||||||
ExpectExperimentServiceCount("experiment-with-service", 0) | ||||||||||
} | ||||||||||
|
||||||||||
func (s *ExperimentSuite) TestExperimentWithMultiportServiceAndScaleDownDelay() { | ||||||||||
g := s.Given() | ||||||||||
g.ApplyManifests("@functional/experiment-with-multiport-service.yaml") | ||||||||||
g.When(). | ||||||||||
WaitForExperimentPhase("experiment-with-multiport-service", "Running"). | ||||||||||
Sleep(time.Second*5). | ||||||||||
Then(). | ||||||||||
ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 1). | ||||||||||
ExpectExperimentServiceCount("experiment-with-multiport-service", 1). | ||||||||||
When(). | ||||||||||
WaitForExperimentPhase("experiment-with-multiport-service", "Successful"). | ||||||||||
Sleep(time.Second*15). | ||||||||||
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.
Suggested change
I saw a few test have these long waits I would rather not slow down the e2e tests any more, I think this is what you where trying to accomplish if so could you switch to it? |
||||||||||
Then(). | ||||||||||
ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 0). | ||||||||||
ExpectExperimentServiceCount("experiment-with-multiport-service", 0) | ||||||||||
} | ||||||||||
|
||||||||||
func (s *ExperimentSuite) TestExperimentWithDryRunMetrics() { | ||||||||||
g := s.Given() | ||||||||||
g.ApplyManifests("@functional/experiment-dry-run-analysis.yaml") | ||||||||||
|
37 changes: 37 additions & 0 deletions
37
test/e2e/functional/experiment-with-multiport-service.yaml
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Experiment | ||
metadata: | ||
name: experiment-with-multiport-service | ||
spec: | ||
duration: 10s | ||
scaleDownDelaySeconds: 5 | ||
# List of pod template specs to run in the experiment as ReplicaSets | ||
templates: | ||
- name: test | ||
replicas: 1 | ||
service: {} | ||
selector: | ||
matchLabels: | ||
app: experiment-with-multiport-service | ||
template: | ||
metadata: | ||
labels: | ||
app: experiment-with-multiport-service | ||
spec: | ||
containers: | ||
- name: experiment-with-multiport-service | ||
image: nginx:1.19-alpine | ||
resources: | ||
requests: | ||
memory: 16Mi | ||
cpu: 1m | ||
ports: | ||
- name: testport1 | ||
protocol: TCP | ||
containerPort: 8080 | ||
- name: testport2 | ||
protocol: TCP | ||
containerPort: 8081 | ||
- name: testport3 | ||
protocol: TCP | ||
containerPort: 8082 |
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.
I saw a few test have these long waits I would rather not slow down the e2e tests any more, I think this is what you where trying to accomplish if so could you switch to it?
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.
@alexef what do you think about 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.
the proposed change makes sense, most of the time rs gets ready in less than 5 seconds