forked from helm/acceptance-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebase on top of upstream/main and squash Red Hat/Openshift downstrea…
…m commits -update pip to pip3 -run openshift tests -Fix test data deployment version -Install PV before test setup and fix deamon set tests -Add helm dir in .acceptance -Change to use current helm bin -Disable test for version greater than 3.1 -Create blank.yml -Enable tests related to Helm 3.2 bin. (helm#2) -Add openshift cluster provider (helm#6) * Run acceptance tests against provided k8s cluster * Add openshift cluster provider -Fix kubeVersion to support kube pre-releases (helm/helm#6190) (helm#9) -Remove obsolete and redundand test cases from kubernetes_versions.robot (helm#12) -Adjust completion test according to helm 3.4 flags (helm#11) -Fixes the completion tests failure by adjusting tests according to new changes flags changes in helm 3.4. Co-authored-by: Akash Shinde <[email protected]> Signed-off-by: Pavel Macík <[email protected]>
- Loading branch information
Showing
25 changed files
with
450 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: acceptance-tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Run acceptance tests | ||
run: make github-actions-ci | ||
|
||
- uses: actions/upload-artifact@master | ||
name: Upload test report | ||
with: | ||
name: helm-acceptance-testing-report-${{ github.sha }} | ||
path: acceptance-testing-reports/${{ github.sha }}/ | ||
if: always() |
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
3 changes: 3 additions & 0 deletions
3
scripts/cluster_providers/openshift_cleanup_all_test_clusters
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,3 @@ | ||
#!/bin/bash | ||
|
||
echo "No need to cleanup cluster" |
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,23 @@ | ||
#!/bin/bash | ||
|
||
echo "No need to create cluster" | ||
export KUBECONFIG=$2 | ||
cat <<EOF | kubectl apply -f - | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: test-pv | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: standard | ||
nfs: | ||
path: /tmp | ||
server: 172.17.0.2 | ||
EOF | ||
|
||
echo "Sleep for 10 secs" | ||
sleep 10 |
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,5 @@ | ||
#!/bin/bash | ||
|
||
export KUBECONFIG=$2 | ||
kubectl delete pv test-pv | ||
echo "Not deleting external cluster" |
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,3 @@ | ||
#!/bin/bash | ||
|
||
echo "export KUBECONFIG=$2" |
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,3 @@ | ||
#!/bin/bash | ||
|
||
echo "No need to wait for externally created cluster" |
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,36 @@ | ||
#!/bin/bash -e | ||
# | ||
# Copyright The Helm Authors. | ||
# | ||
# 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. | ||
|
||
# Create a persistance volume with standard storageclass | ||
cat <<EOF | kubectl apply -f - | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: test-pv | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: standard | ||
nfs: | ||
path: /tmp | ||
server: 172.17.0.2 | ||
EOF | ||
|
||
echo "Sleep for 10 secs" | ||
sleep 10 |
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,5 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
.git |
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,14 @@ | ||
apiVersion: v1 | ||
description: A basic NGINX HTTP server | ||
home: https://github.com/helm/helm | ||
keywords: | ||
- http | ||
- nginx | ||
- www | ||
- web | ||
kubeVersion: '>=1.2.0-0' | ||
maintainers: [] | ||
name: nginx | ||
sources: | ||
- https://hub.docker.com/_/nginx/ | ||
version: 0.1.0 |
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 @@ | ||
Sample notes for {{ .Chart.Name }} |
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,16 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "nginx.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "nginx.fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
154 changes: 154 additions & 0 deletions
154
testdata/charts/openshift-nginx/templates/deployment.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,154 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nginx.fullname" . }}-ext | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-ext | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-ext | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-ext | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ template "nginx.name" . }} | ||
image: "alpine:latest" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- sleep | ||
- "50000" | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- sh | ||
- "-c" | ||
- "echo bar | grep {{ if .Values.breakme }}foo{{ else }}bar{{ end }}" | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nginx.fullname" . }}-v1beta1 | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta1 | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta1 | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ template "nginx.name" . }} | ||
image: "alpine:latest" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- sleep | ||
- "50000" | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- sh | ||
- "-c" | ||
- "echo bar | grep {{ if .Values.breakme }}foo{{ else }}bar{{ end }}" | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nginx.fullname" . }}-v1beta2 | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta2 | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta2 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1beta2 | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ template "nginx.name" . }} | ||
image: "alpine:latest" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- sleep | ||
- "50000" | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- sh | ||
- "-c" | ||
- "echo bar | grep {{ if .Values.breakme }}foo{{ else }}bar{{ end }}" | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nginx.fullname" . }}-v1 | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1 | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "nginx.name" . }}-v1 | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ template "nginx.name" . }} | ||
image: "alpine:latest" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- sleep | ||
- "50000" | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- sh | ||
- "-c" | ||
- "echo bar | grep {{ if .Values.breakme }}foo{{ else }}bar{{ end }}" |
Oops, something went wrong.