Add Tempest script in helm test framework
Now, openstack-helm support "helm test" function, and It execute rally container. Rally also can test Tempest itself, so this fix will be add tempest test in rally container. Change-Id: I2c2f684f6583f2a3d9c7279a3d85cb242934e90e Implements: blueprint add-tempest-in-helm-test
This commit is contained in:
parent
b06fab9c07
commit
aacd11e361
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if .Values.manifests.configmap_bin }}
|
||||
{{- $envAll := . }}
|
||||
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -23,7 +24,7 @@ metadata:
|
||||
name: cinder-bin
|
||||
data:
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
@ -70,7 +70,17 @@ metadata:
|
||||
name: cinder-etc
|
||||
data:
|
||||
rally_tests.yaml: |+
|
||||
{{ if .Values.conf.rally_tests.override -}}
|
||||
{{ .Values.conf.rally_tests.override | indent 4 }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.rally_tests.prefix -}}
|
||||
{{ .Values.conf.rally_tests.prefix | indent 4 }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.rally_tests.append -}}
|
||||
{{ .Values.conf.rally_tests.append | indent 4 }}
|
||||
{{- end }}
|
||||
cinder.conf: |+
|
||||
{{ if .Values.conf.cinder.override -}}
|
||||
{{ .Values.conf.cinder.override | indent 4 }}
|
||||
|
@ -26,7 +26,7 @@ labels:
|
||||
release_group: null
|
||||
|
||||
images:
|
||||
test: docker.io/kolla/ubuntu-binary-rally:4.0.0
|
||||
test: docker.io/kolla/ubuntu-source-rally:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-cinder-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-cinder-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -236,6 +236,7 @@ conf:
|
||||
rados_connect_timeout: -1
|
||||
rbd_user: "admin"
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
override:
|
||||
append:
|
||||
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if .Values.manifests.configmap_bin }}
|
||||
{{- $envAll := . }}
|
||||
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -23,7 +24,7 @@ metadata:
|
||||
name: glance-bin
|
||||
data:
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
@ -27,7 +27,7 @@ labels:
|
||||
release_group: null
|
||||
|
||||
images:
|
||||
test: docker.io/kolla/ubuntu-binary-rally:4.0.0
|
||||
test: docker.io/kolla/ubuntu-source-rally:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-glance-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-glance-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -57,6 +57,7 @@ bootstrap:
|
||||
|
||||
conf:
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
override:
|
||||
append:
|
||||
images:
|
||||
|
@ -14,15 +14,22 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "helm-toolkit.scripts.rally_test" }}
|
||||
{{- define "helm-toolkit.scripts.rally_test" -}}
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
{{- $rallyTests := index . 0 }}
|
||||
|
||||
: ${RALLY_ENV_NAME:="openstack-helm"}
|
||||
rally-manage db create
|
||||
rally deployment create --fromenv --name ${RALLY_ENV_NAME}
|
||||
rally deployment use ${RALLY_ENV_NAME}
|
||||
rally deployment check
|
||||
{{- if $rallyTests.run_tempest }}
|
||||
rally verify create-verifier --name ${RALLY_ENV_NAME}-tempest --type tempest
|
||||
SERVICE_TYPE=$(rally deployment check | grep ${RALLY_ENV_NAME} | awk -F \| '{print $3}' | tr -d ' ' | tr -d '\n')
|
||||
rally verify start --pattern tempest.api.$SERVICE_TYPE*
|
||||
rally verify delete-verifier --id ${RALLY_ENV_NAME}-tempest --force
|
||||
{{- end }}
|
||||
rally task validate /etc/rally/rally_tests.yaml
|
||||
rally task start /etc/rally/rally_tests.yaml
|
||||
rally deployment destroy --deployment ${RALLY_ENV_NAME}
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if .Values.manifests.configmap_bin }}
|
||||
{{- $envAll := . }}
|
||||
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -27,7 +28,7 @@ data:
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
@ -25,7 +25,7 @@ release_group: null
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-keystone:3.0.3
|
||||
test: docker.io/kolla/ubuntu-binary-rally:4.0.0
|
||||
test: docker.io/kolla/ubuntu-source-rally:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-keystone:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-keystone:3.0.3
|
||||
fernet_setup: docker.io/kolla/ubuntu-source-keystone:3.0.3
|
||||
@ -241,6 +241,7 @@ jobs:
|
||||
|
||||
conf:
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
override:
|
||||
append:
|
||||
paste:
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if .Values.manifests.configmap_bin }}
|
||||
{{- $envAll := . }}
|
||||
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -27,7 +28,7 @@ data:
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||
db-init.py: |+
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |+
|
||||
|
@ -84,7 +84,17 @@ metadata:
|
||||
name: neutron-etc
|
||||
data:
|
||||
rally_tests.yaml: |+
|
||||
{{ if .Values.conf.rally_tests.override -}}
|
||||
{{ .Values.conf.rally_tests.override | indent 4 }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.rally_tests.prefix -}}
|
||||
{{ .Values.conf.rally_tests.prefix | indent 4 }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.rally_tests.append -}}
|
||||
{{ .Values.conf.rally_tests.append | indent 4 }}
|
||||
{{- end }}
|
||||
api-paste.ini: |+
|
||||
{{ if .Values.conf.paste.override -}}
|
||||
{{ .Values.conf.paste.override | indent 4 }}
|
||||
|
@ -29,7 +29,7 @@ metadata:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
||||
containers:
|
||||
- name: {{.Release.Name}}-token-issue-test
|
||||
image: {{ .Values.images.test }}
|
||||
@ -42,6 +42,7 @@ spec:
|
||||
- name: RALLY_ENV_NAME
|
||||
value: {{.Release.Name}}
|
||||
command:
|
||||
- bash
|
||||
- /tmp/rally-test.sh
|
||||
volumeMounts:
|
||||
- name: neutron-etc
|
||||
|
@ -21,7 +21,7 @@ release_group: null
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-neutron-server:3.0.3
|
||||
test: docker.io/kolla/ubuntu-binary-rally:4.0.0
|
||||
test: docker.io/kolla/ubuntu-source-rally:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-neutron-server:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-neutron-server:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -354,6 +354,10 @@ pod:
|
||||
cpu: "2000m"
|
||||
|
||||
conf:
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
override:
|
||||
append:
|
||||
paste:
|
||||
override:
|
||||
append:
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if .Values.manifests.configmap_bin }}
|
||||
{{- $envAll := . }}
|
||||
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -23,7 +24,7 @@ metadata:
|
||||
name: nova-bin
|
||||
data:
|
||||
rally-test.sh: |
|
||||
{{- include "helm-toolkit.scripts.rally_test" . | indent 4 }}
|
||||
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||
db-init.py: |+
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |+
|
||||
|
@ -94,7 +94,17 @@ metadata:
|
||||
name: nova-etc
|
||||
data:
|
||||
rally_tests.yaml: |+
|
||||
{{ if .Values.conf.rally_tests.override -}}
|
||||
{{ .Values.conf.rally_tests.override | indent 4 }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.rally_tests.prefix -}}
|
||||
{{ .Values.conf.rally_tests.prefix | indent 4 }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.rally_tests.append -}}
|
||||
{{ .Values.conf.rally_tests.append | indent 4 }}
|
||||
{{- end }}
|
||||
nova.conf: |+
|
||||
{{ if .Values.conf.nova.override -}}
|
||||
{{ .Values.conf.nova.override | indent 4 }}
|
||||
|
@ -29,10 +29,11 @@ metadata:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
||||
containers:
|
||||
- name: {{.Release.Name}}-token-issue-test
|
||||
image: {{ .Values.images.test }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
|
||||
@ -40,6 +41,7 @@ spec:
|
||||
- name: RALLY_ENV_NAME
|
||||
value: {{.Release.Name}}
|
||||
command:
|
||||
- bash
|
||||
- /tmp/rally-test.sh
|
||||
volumeMounts:
|
||||
- name: nova-etc
|
||||
|
@ -50,7 +50,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
test: docker.io/kolla/ubuntu-binary-rally:4.0.0
|
||||
test: docker.io/kolla/ubuntu-source-rally:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-nova-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-nova-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -265,6 +265,10 @@ console:
|
||||
vncserver_proxyclient_interface:
|
||||
|
||||
conf:
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
override:
|
||||
append:
|
||||
paste:
|
||||
override:
|
||||
append:
|
||||
|
Loading…
Reference in New Issue
Block a user