diff --git a/tests/files/services/docker-compose.yml b/tests/files/services/docker-compose.yml index fd2eef8ec3..477a709a38 100644 --- a/tests/files/services/docker-compose.yml +++ b/tests/files/services/docker-compose.yml @@ -5,25 +5,26 @@ services: image: uselagoon/mariadb-10.5 labels: lagoon.type: mariadb-single + lagoon.persistent.size: 100Mi ports: - '3306' - mariadb-10-6: - image: uselagoon/mariadb-10.6 + mariadb-10-11: + image: uselagoon/mariadb-10.11 labels: lagoon.type: mariadb ports: - '3306' mongo-4: - image: uselagoon/mongo:latest + image: uselagoon/mongo-4 labels: lagoon.type: mongo ports: - '27017' opensearch-2: - image: uselagoon/opensearch-2:latest + image: uselagoon/opensearch-2 environment: - cluster.name=opensearch-cluster - node.name=opensearch @@ -39,7 +40,8 @@ services: soft: 65536 hard: 65536 labels: - lagoon.type: none # gets set to opensearch in a second deployment + lagoon.type: opensearch + lagoon.persistent.size: 100Mi ports: - '9200' @@ -47,18 +49,19 @@ services: image: uselagoon/postgres-13 labels: lagoon.type: postgres-single + lagoon.persistent.size: 100Mi ports: - '5432' - postgres-14: - image: uselagoon/postgres-14 + postgres-15: + image: uselagoon/postgres-15 labels: lagoon.type: postgres ports: - '5432' - redis-6: - image: uselagoon/redis-6 + redis-7: + image: uselagoon/redis-7 labels: lagoon.type: redis ports: @@ -68,6 +71,7 @@ services: image: uselagoon/solr-8 labels: lagoon.type: solr + lagoon.persistent.size: 100Mi ports: - "8983" command: @@ -77,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 diff --git a/tests/tests/services/services.yaml b/tests/tests/services/services.yaml index 3b357cccf1..24adb53c7e 100644 --- a/tests/tests/services/services.yaml +++ b/tests/tests/services/services.yaml @@ -33,16 +33,16 @@ hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb-10.5" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb?service=mariadb-10.5" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml -- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, mariadb 10.6 service" +- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, mariadb 10.11 service" hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb-10.6" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb?service=mariadb-10.11" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml @@ -51,16 +51,16 @@ hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres-13" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres?service=postgres-13" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml -- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, postgres-14 service" +- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, postgres-15 service" hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres-14" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres?service=postgres-15" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml @@ -69,7 +69,7 @@ hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mongo-4" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mongo?service=mongo-4" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml @@ -78,46 +78,34 @@ hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/solr-8" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/solr?service=solr-8" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml -- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, redis-6 service" +- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, redis-7 service" hosts: localhost serial: 1 vars: - url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redis-6" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redis?service=redis-7" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" 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" +- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, opensearch-2 service" hosts: localhost serial: 1 vars: - branch: "{{ branch }}" - project: "{{ project }}" - namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" + url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/opensearch?service=opensearch-2" + expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml -- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, opensearch-2 service" +- 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 }}/opensearch-2" + 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