-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test for background analysis with inconclusive result
- Loading branch information
1 parent
6ced7fc
commit 19809c1
Showing
5 changed files
with
92 additions
and
0 deletions.
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
19 changes: 19 additions & 0 deletions
19
test/e2e/functional/analysistemplate-web-background-inconclusive.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,19 @@ | ||
# A dummy web metric which uses the kubernetes version endpoint as a metric provider | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: AnalysisTemplate | ||
metadata: | ||
name: web-background-inconclusive | ||
spec: | ||
args: | ||
- name: url-val | ||
value: "https://kubernetes.default.svc/version" | ||
metrics: | ||
- name: web | ||
interval: 7s | ||
inconclusiveLimit: 3 | ||
successCondition: result.major == '2000' | ||
failureCondition: result.major == '1000' | ||
provider: | ||
web: | ||
url: "{{args.url-val}}" | ||
insecure: true |
30 changes: 30 additions & 0 deletions
30
test/e2e/functional/rollout-background-analysis-inconclusive.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,30 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: rollout-background-analysis-inconclusive | ||
spec: | ||
replicas: 2 | ||
strategy: | ||
canary: | ||
steps: | ||
- setWeight: 10 | ||
- pause: { duration: 30s } | ||
analysis: | ||
templates: | ||
- templateName: web-background-inconclusive | ||
startingStep: 1 | ||
selector: | ||
matchLabels: | ||
app: rollout-background-analysis-inconclusive | ||
template: | ||
metadata: | ||
labels: | ||
app: rollout-background-analysis-inconclusive | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: nginx:1.19-alpine | ||
resources: | ||
requests: | ||
memory: 16Mi | ||
cpu: 5m |
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