Skip to content

Commit

Permalink
add persistent storage test
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Nov 7, 2023
1 parent 11f678e commit 622f19a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
12 changes: 10 additions & 2 deletions tests/files/services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
image: uselagoon/mariadb-10.5
labels:
lagoon.type: mariadb-single
lagoon.persistent.size: 100Mi
ports:
- '3306'

Expand Down Expand Up @@ -40,14 +41,15 @@ services:
hard: 65536
labels:
lagoon.type: opensearch
# lagoon.type: none # gets set to opensearch in a second deployment
lagoon.persistent.size: 100Mi
ports:
- '9200'

postgres-13:
image: uselagoon/postgres-13
labels:
lagoon.type: postgres-single
lagoon.persistent.size: 100Mi
ports:
- '5432'

Expand All @@ -69,6 +71,7 @@ services:
image: uselagoon/solr-8
labels:
lagoon.type: solr
lagoon.persistent.size: 100Mi
ports:
- "8983"
command:
Expand All @@ -78,6 +81,11 @@ services:
internal-services-test:
image: uselagoon/internal-services-test:main
labels:
lagoon.type: basic
lagoon.type: basic-persistent
lagoon.persistent: /app/files
lagoon.persistent.size: 10Mi
lagoon.persistent.class: bulk
ports:
- "3000"
environment:
- STORAGE_LOCATION=/app/files
30 changes: 9 additions & 21 deletions tests/tests/services/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,6 @@
tasks:
- ansible.builtin.include_tasks: ../../checks/check-url-content.yaml

# - name: "{{ testname }} - api add envVariable on {{ project }}"
# hosts: localhost
# serial: 1
# vars:
# envName: "LAGOON_SERVICE_TYPES"
# envValue: "opensearch-2:opensearch"
# envScope: "BUILD"
# project: "{{ project }}"
# tasks:
# - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml

# - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit"
# hosts: localhost
# serial: 1
# vars:
# branch: "{{ branch }}"
# project: "{{ project }}"
# namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}"
# tasks:
# - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, opensearch-2 service"
hosts: localhost
serial: 1
Expand All @@ -122,6 +101,15 @@
tasks:
- ansible.builtin.include_tasks: ../../checks/check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, persistent storage"
hosts: localhost
serial: 1
vars:
url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/storage?path=/app/files"
expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}"
tasks:
- ansible.builtin.include_tasks: ../../checks/check-url-content.yaml

- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources"
hosts: localhost
serial: 1
Expand Down

0 comments on commit 622f19a

Please sign in to comment.