Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Dec 11, 2023
1 parent 7d282bd commit 0d17a5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
template: postgresql-persistent-template
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
name: {{ .Release.Namespace }}
name: {{ .Release.Name }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
- --live
initialDelaySeconds: 120
timeoutSeconds: 10
name: "postgresql-testing"
name: "postgresql-persistent"
ports:
- containerPort: {{ .Values.config.port }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ spec:
value: "{{ .Values.config.port }}"
command:
- /bin/bash
- -ec
- -exc
- "PGPASSWORD=$PGPASSWORD /usr/bin/pg_isready -d $POSTGRESQL_DATABASE -h {{ .Values.database_service_name }} -p $POSTGRESQL_PORT -U $POSTGRESQL_USER"
lookupPolicy:
local: true
restartPolicy: Never
4 changes: 2 additions & 2 deletions charts/redhat/postgresql-persistent/src/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
database_service_name: postgresql-testing
database_service_name: postgresql-persistent
memory_limit: 512Mi
namespace: postgresql-persistent-testing
volume_capacity: 1Gi
Expand All @@ -8,4 +8,4 @@ config:
postgresql_user: testu
port: 5432
image:
tag: "latest"
tag: "13-el8"
2 changes: 0 additions & 2 deletions tests/test_postgresql_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ def teardown_method(self):
self.hc_api.delete_project()

def test_package_persistent(self):
self.hc_api.set_version("0.0.1")
self.hc_api.package_name = "postgresql-imagestreams"
self.hc_api.helm_package()
assert self.hc_api.helm_installation()
self.hc_api.set_version("0.0.3")
self.hc_api.package_name = "postgresql-persistent"
self.hc_api.helm_package()
assert self.hc_api.helm_installation(values={".image.tag": "13-el8", ".namespace": self.hc_api.namespace})
Expand Down

0 comments on commit 0d17a5c

Please sign in to comment.