-
Notifications
You must be signed in to change notification settings - Fork 0
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
Integration test enhancements #10
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4468294
Enhance integration tests
witomlin 8f4f402
Adjust tests timeout
witomlin 861c159
More integration test enhancements
witomlin 2f7c189
Update docs and introduce multi-Kube version integration tests into GHA
witomlin 7fb2cd2
Add test name to log output
witomlin d50f612
Reduce timeout
witomlin ccc5edb
Update readme
witomlin 14b6c78
Add additional condition to suppliedConfigSetString
witomlin 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
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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* | ||
Copyright 2024 Expedia Group, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package integration | ||
|
||
import "os" | ||
|
||
// Path ---------------------------------------------------------------------------------------------------------------- | ||
const ( | ||
pathSeparator = string(os.PathSeparator) | ||
pathIntTestRelPath = "test" + pathSeparator + "integration" | ||
pathConfigDirRelPath = pathIntTestRelPath + pathSeparator + "config" | ||
) | ||
|
||
// kind ---------------------------------------------------------------------------------------------------------------- | ||
const ( | ||
kindClusterName = "csa-int-cluster" | ||
kindConfigFileRelPath = pathConfigDirRelPath + pathSeparator + "kind.yaml" | ||
) | ||
|
||
var k8sVersionToImage = map[string]map[string]string{ | ||
"1.31": { | ||
"amd64": "kindest/node:v1.31.0@sha256:919a65376fd11b67df05caa2e60802ad5de2fca250c9fe0c55b0dce5c9591af3", | ||
"arm64": "kindest/node:v1.31.0@sha256:0ccfb11dc66eae4abc20c30ee95687bab51de8aeb04e325e1c49af0890646548", | ||
}, | ||
"1.30": { | ||
"amd64": "kindest/node:v1.30.4@sha256:34cb98a38a57a3357fde925a41d61232bbbbeb411b45a25c0d766635d6c3b975", | ||
"arm64": "kindest/node:v1.30.4@sha256:6becd630a18e77730e31f3833f0b129bbcc9c09ee49c3b88429b3c1fdc30bfc4", | ||
}, | ||
"1.29": { | ||
"amd64": "kindest/node:v1.29.8@sha256:b69a150f9951ef41158ec76de381a920df2be3582fd16fc19cf4757eef0dded9", | ||
"arm64": "kindest/node:v1.29.8@sha256:0d5623800cf6290edbc1007ca8a33a5f7e2ad92b41dc7022b4d20a66447db23c", | ||
}, | ||
"1.28": { | ||
"amd64": "kindest/node:v1.28.13@sha256:d97df9fff48099bf9a94c92fdc39adde65bec2aa1d011f84233b96172c1003c9", | ||
"arm64": "kindest/node:v1.28.13@sha256:ddef612bb93a9aa3a989f9d3d4e01c0a7c4d866a4b949264146c182cd202d738", | ||
}, | ||
} | ||
|
||
// metrics-server ------------------------------------------------------------------------------------------------------ | ||
const ( | ||
metricsServerImageTag = "registry.k8s.io/metrics-server/metrics-server:v0.6.4" | ||
metricsServerKustomizeDirRelPath = pathConfigDirRelPath + pathSeparator + "metricsserver" | ||
metricsServerReadyTimeout = "60s" | ||
) | ||
|
||
// CSA ----------------------------------------------------------------------------------------------------------------- | ||
const ( | ||
csaDockerImage = "csa" | ||
csaDockerTag = "test" | ||
csaDockerImageTag = csaDockerImage + ":" + csaDockerTag | ||
) | ||
|
||
const ( | ||
csaHelmChartRelPath = "charts" + pathSeparator + "container-startup-autoscaler" | ||
csaHelmName = "csa-int" | ||
csaHelmTimeout = "60s" | ||
) | ||
|
||
const ( | ||
csaStatusWaitMillis = 1000 | ||
csaStatusMessageStartupCommanded = "Startup resources commanded" | ||
csaStatusMessageStartupCommandedUnknownRes = "Startup resources commanded (unknown resources applied)" | ||
csaStatusMessagePostStartupCommanded = "Post-startup resources commanded" | ||
csaStatusMessagePostStartupCommandedUnknownRes = "Post-startup resources commanded (unknown resources applied)" | ||
csaStatusMessageStartupEnacted = "Startup resources enacted" | ||
csaStatusMessagePostStartupEnacted = "Post-startup resources enacted" | ||
csaStatusMessageValidationError = "Validation error" | ||
) | ||
|
||
const ( | ||
csaEventReasonScaling = "Scaling" | ||
csaEventReasonValidation = "Validation" | ||
) | ||
|
||
// echo-server --------------------------------------------------------------------------------------------------------- | ||
const ( | ||
echoServerDockerImageTag = "ealen/echo-server:0.7.0" | ||
echoServerName = "echo-server" | ||
) | ||
|
||
const ( | ||
echoServerNonTargetContainerName = echoServerName + "-non-target" | ||
echoServerNonTargetContainerCpuRequests = "50m" | ||
echoServerNonTargetContainerCpuLimits = "50m" | ||
echoServerNonTargetContainerMemoryRequests = "150M" | ||
echoServerNonTargetContainerMemoryLimits = "150M" | ||
) | ||
|
||
const ( | ||
echoServerDefaultProbeInitialDelaySeconds = 15 | ||
echoServerProbePeriodSeconds = 1 | ||
echoServerProbeFailureThreshold = echoServerDefaultProbeInitialDelaySeconds | ||
) | ||
|
||
// Tests --------------------------------------------------------------------------------------------------------------- | ||
const ( | ||
testsDefaultWaitStatusTimeoutSecs = echoServerDefaultProbeInitialDelaySeconds * 2 | ||
) |
Oops, something went wrong.
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.
To avoid feature (parameter) creep we could avoid exposing these parameters. The default values are expected to provide a clean execution.