diff --git a/energy-tests/Dockerfile b/energy-tests/Dockerfile deleted file mode 100644 index 5c2b424e..00000000 --- a/energy-tests/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM mcr.microsoft.com/playwright/python:v1.35.0-jammy - -# Install dependencies -RUN apt-get update && apt-get install -y curl wget gnupg && rm -rf /var/lib/apt/lists/* - -# Install Playwright -RUN pip install playwright==1.35.0 - -# Set up Playwright dependencies for Chromium, Firefox and Webkit -RUN playwright install -RUN playwright install-deps - -CMD ["/bin/bash"] diff --git a/energy-tests/compose-fpm-mariadb.yml b/energy-tests/compose-fpm-mariadb.yml index cf0cb29c..46abafc1 100644 --- a/energy-tests/compose-fpm-mariadb.yml +++ b/energy-tests/compose-fpm-mariadb.yml @@ -9,8 +9,8 @@ services: image: mariadb:11.0.2-jammy restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW - volumes: - - db:/var/lib/mysql + #volumes: + # - db:/var/lib/mysql # This is the usual way of starting this service in a container, but we do not need persistent data storage for benchmarking environment: - MYSQL_ROOT_PASSWORD=TheGibson - MYSQL_PASSWORD=TheGibson @@ -22,8 +22,8 @@ services: restart: always links: - db - volumes: - - nextcloud:/var/www/html + #volumes: + # - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking environment: - MYSQL_PASSWORD=TheGibson - MYSQL_DATABASE=nextcloud @@ -41,3 +41,7 @@ services: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - app + healthcheck: + test: ["curl", "-f", "http://nc"] + interval: "1s" + diff --git a/energy-tests/compose-mariadb.yml b/energy-tests/compose-mariadb.yml index b3ec7213..eed4c429 100644 --- a/energy-tests/compose-mariadb.yml +++ b/energy-tests/compose-mariadb.yml @@ -9,8 +9,8 @@ services: image: mariadb:11.0.2-jammy restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW - volumes: - - db:/var/lib/mysql + #volumes: + # - db:/var/lib/mysql # This is the usual way of starting this service in a container, but we do not need persistent data storage for benchmarking environment: - MYSQL_ROOT_PASSWORD=TheGibson - MYSQL_PASSWORD=TheGibson @@ -24,10 +24,13 @@ services: - 8080:80 links: - db - volumes: - - nextcloud:/var/www/html + #volumes: + # - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking environment: - MYSQL_PASSWORD=TheGibson - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db + healthcheck: + test: ["curl", "-f", "http://nc"] + interval: "1s" diff --git a/energy-tests/compose-postgres.yml b/energy-tests/compose-postgres.yml index f068ab0a..2db54c8c 100644 --- a/energy-tests/compose-postgres.yml +++ b/energy-tests/compose-postgres.yml @@ -8,8 +8,8 @@ services: db: image: postgres:15.3-alpine3.18 restart: always - volumes: - - db:/var/lib/postgresql/data:Z + #volumes: + # - db:/var/lib/postgresql/data:Z # This is the usual way of starting this service in a container, but we do not need persistent data storage for benchmarking environment: - POSTGRES_PASSWORD=TheGibson - POSTGRES_DB=nextcloud @@ -22,10 +22,13 @@ services: - 8080:80 links: - db - volumes: - - nextcloud:/var/www/html + #volumes: + # - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking environment: - POSTGRES_PASSWORD=TheGibson - POSTGRES_DB=nextcloud - POSTGRES_USER=nextcloud - - POSTGRES_HOST=db \ No newline at end of file + - POSTGRES_HOST=db + healthcheck: + test: ["curl", "-f", "http://nc"] + interval: "1s" diff --git a/energy-tests/compose-sqlite.yml b/energy-tests/compose-sqlite.yml index 6e980839..566dd4a2 100644 --- a/energy-tests/compose-sqlite.yml +++ b/energy-tests/compose-sqlite.yml @@ -6,5 +6,8 @@ services: restart: always ports: - 8080:80 - volumes: - - nextcloud:/var/www/html + #volumes: + # - nextcloud:/var/www/html # This is the usual way of using nextcloud in a container, but we do not need persistent data storage for benchmarking + healthcheck: + test: ["curl", "-f", "http://nc"] + interval: "1s" diff --git a/energy-tests/nextcloud_create_event.py b/energy-tests/nextcloud_create_event.py index 3a6d3fcd..cafb535f 100644 --- a/energy-tests/nextcloud_create_event.py +++ b/energy-tests/nextcloud_create_event.py @@ -2,7 +2,7 @@ import contextlib import sys from time import time_ns, sleep -from playwright.sync_api import Playwright, sync_playwright, expect +from playwright.sync_api import Playwright, sync_playwright, expect, TimeoutError def log_note(message: str) -> None: timestamp = str(time_ns())[:16] @@ -30,15 +30,15 @@ def run(playwright: Playwright, browser_name: str) -> None: # Sleep to make sure the modal has time to appear before continuing navigation sleep(5) log_note("Close welcome popup") - with contextlib.suppress(Exception): - page.get_by_role("button", name="Close modal").click(timeout=15_000) + with contextlib.suppress(TimeoutError): + page.locator('button.first-run-wizard__close-button').click(timeout=15_000) log_note("Go to calendar") page.get_by_role("link", name="Calendar").click() # Second welcome screen? - with contextlib.suppress(Exception): - page.get_by_role("button", name="Close modal").click(timeout=15_000) + with contextlib.suppress(TimeoutError): + page.locator('button.first-run-wizard__close-button').click(timeout=15_000) log_note("Create event") event_name = "Weekly sync" diff --git a/energy-tests/usage_scenario-fpm-mariadb-event-chromium.yml b/energy-tests/usage_scenario-fpm-mariadb-event-chromium.yml index 7c897887..7d143a01 100644 --- a/energy-tests/usage_scenario-fpm-mariadb-event-chromium.yml +++ b/energy-tests/usage_scenario-fpm-mariadb-event-chromium.yml @@ -7,41 +7,20 @@ compose-file: !include compose-fpm-mariadb.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - app: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -50,7 +29,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py + command: python3 /tmp/repo/nextcloud_create_event.py note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-fpm-mariadb-talk-chromium.yml b/energy-tests/usage_scenario-fpm-mariadb-talk-chromium.yml index 4824abba..7509f883 100644 --- a/energy-tests/usage_scenario-fpm-mariadb-talk-chromium.yml +++ b/energy-tests/usage_scenario-fpm-mariadb-talk-chromium.yml @@ -10,41 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - app: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -53,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py + command: python3 /tmp/repo/nextcloud_talk.py note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-docs-chromium.yml b/energy-tests/usage_scenario-mariadb-docs-chromium.yml index a5d46c34..76d77876 100644 --- a/energy-tests/usage_scenario-mariadb-docs-chromium.yml +++ b/energy-tests/usage_scenario-mariadb-docs-chromium.yml @@ -10,39 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -51,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py + command: python3 /tmp/repo/nextcloud_create_user.py note: Create user read-notes-stdout: true log-stdout: true @@ -60,7 +41,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py note: Create document and share read-notes-stdout: true log-stdout: true @@ -69,7 +50,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py + command: python3 /tmp/repo/nextcloud_docs_collaboration.py note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-docs-firefox.yml b/energy-tests/usage_scenario-mariadb-docs-firefox.yml index 784fb582..66391a6f 100644 --- a/energy-tests/usage_scenario-mariadb-docs-firefox.yml +++ b/energy-tests/usage_scenario-mariadb-docs-firefox.yml @@ -10,39 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -51,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py firefox + command: python3 /tmp/repo/nextcloud_create_user.py firefox note: Create user read-notes-stdout: true log-stdout: true @@ -60,7 +41,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py firefox + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py firefox note: Create document and share read-notes-stdout: true log-stdout: true @@ -69,7 +50,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py firefox + command: python3 /tmp/repo/nextcloud_docs_collaboration.py firefox note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-event-chromium.yml b/energy-tests/usage_scenario-mariadb-event-chromium.yml index ac89c910..f2e074f7 100644 --- a/energy-tests/usage_scenario-mariadb-event-chromium.yml +++ b/energy-tests/usage_scenario-mariadb-event-chromium.yml @@ -7,37 +7,20 @@ compose-file: !include compose-mariadb.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -46,7 +29,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py + command: python3 /tmp/repo/nextcloud_create_event.py note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-event-firefox.yml b/energy-tests/usage_scenario-mariadb-event-firefox.yml index cc3ce9f4..adc33ca8 100644 --- a/energy-tests/usage_scenario-mariadb-event-firefox.yml +++ b/energy-tests/usage_scenario-mariadb-event-firefox.yml @@ -7,37 +7,20 @@ compose-file: !include compose-mariadb.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -47,7 +30,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py firefox + command: python3 /tmp/repo/nextcloud_create_event.py firefox note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-talk-chromium.yml b/energy-tests/usage_scenario-mariadb-talk-chromium.yml index f85ffe26..958b7e1c 100644 --- a/energy-tests/usage_scenario-mariadb-talk-chromium.yml +++ b/energy-tests/usage_scenario-mariadb-talk-chromium.yml @@ -10,37 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -49,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py + command: python3 /tmp/repo/nextcloud_talk.py note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-mariadb-talk-firefox.yml b/energy-tests/usage_scenario-mariadb-talk-firefox.yml index ba40c855..c735dd3d 100644 --- a/energy-tests/usage_scenario-mariadb-talk-firefox.yml +++ b/energy-tests/usage_scenario-mariadb-talk-firefox.yml @@ -10,37 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -49,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py firefox + command: python3 /tmp/repo/nextcloud_talk.py firefox note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-docs-chromium.yml b/energy-tests/usage_scenario-postgres-docs-chromium.yml index cac3b9bc..0f5047d8 100644 --- a/energy-tests/usage_scenario-postgres-docs-chromium.yml +++ b/energy-tests/usage_scenario-postgres-docs-chromium.yml @@ -10,39 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -51,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py + command: python3 /tmp/repo/nextcloud_create_user.py note: Create user read-notes-stdout: true log-stdout: true @@ -60,7 +41,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py note: Create document and share read-notes-stdout: true log-stdout: true @@ -69,7 +50,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py + command: python3 /tmp/repo/nextcloud_docs_collaboration.py note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-docs-firefox.yml b/energy-tests/usage_scenario-postgres-docs-firefox.yml index 71b7f612..e1c55c81 100644 --- a/energy-tests/usage_scenario-postgres-docs-firefox.yml +++ b/energy-tests/usage_scenario-postgres-docs-firefox.yml @@ -10,39 +10,21 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -51,7 +33,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py firefox + command: python3 /tmp/repo/nextcloud_create_user.py firefox note: Create user read-notes-stdout: true log-stdout: true @@ -60,7 +42,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py firefox + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py firefox note: Create document and share read-notes-stdout: true log-stdout: true @@ -69,7 +51,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py firefox + command: python3 /tmp/repo/nextcloud_docs_collaboration.py firefox note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-event-chromium.yml b/energy-tests/usage_scenario-postgres-event-chromium.yml index 47ebe6bd..49077132 100644 --- a/energy-tests/usage_scenario-postgres-event-chromium.yml +++ b/energy-tests/usage_scenario-postgres-event-chromium.yml @@ -7,37 +7,21 @@ compose-file: !include compose-postgres.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -46,7 +30,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py + command: python3 /tmp/repo/nextcloud_create_event.py note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-event-firefox.yml b/energy-tests/usage_scenario-postgres-event-firefox.yml index 41b2003a..2ca2aabf 100644 --- a/energy-tests/usage_scenario-postgres-event-firefox.yml +++ b/energy-tests/usage_scenario-postgres-event-firefox.yml @@ -7,37 +7,20 @@ compose-file: !include compose-postgres.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -46,7 +29,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py firefox + command: python3 /tmp/repo/nextcloud_create_event.py firefox note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-talk-chromium.yml b/energy-tests/usage_scenario-postgres-talk-chromium.yml index 77b5f89c..ab29fe5a 100644 --- a/energy-tests/usage_scenario-postgres-talk-chromium.yml +++ b/energy-tests/usage_scenario-postgres-talk-chromium.yml @@ -10,37 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -49,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py + command: python3 /tmp/repo/nextcloud_talk.py note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-postgres-talk-firefox.yml b/energy-tests/usage_scenario-postgres-talk-firefox.yml index efbcfba5..60a6df48 100644 --- a/energy-tests/usage_scenario-postgres-talk-firefox.yml +++ b/energy-tests/usage_scenario-postgres-talk-firefox.yml @@ -10,37 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - db: - volumes: [] - networks: - - nextcloud-setup-network - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -49,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py firefox + command: python3 /tmp/repo/nextcloud_talk.py firefox note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-docs-chromium.yml b/energy-tests/usage_scenario-sqlite-docs-chromium.yml index 1df64917..23d8a5c7 100644 --- a/energy-tests/usage_scenario-sqlite-docs-chromium.yml +++ b/energy-tests/usage_scenario-sqlite-docs-chromium.yml @@ -10,35 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -47,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py + command: python3 /tmp/repo/nextcloud_create_user.py note: Create user read-notes-stdout: true log-stdout: true @@ -56,7 +41,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py note: Create document and share read-notes-stdout: true log-stdout: true @@ -65,7 +50,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py + command: python3 /tmp/repo/nextcloud_docs_collaboration.py note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-docs-firefox.yml b/energy-tests/usage_scenario-sqlite-docs-firefox.yml index a7254338..ac75f7cd 100644 --- a/energy-tests/usage_scenario-sqlite-docs-firefox.yml +++ b/energy-tests/usage_scenario-sqlite-docs-firefox.yml @@ -10,35 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_user.py /tmp/nextcloud_create_user.py - - cp /tmp/repo/nextcloud_create_doc_and_share.py /tmp/nextcloud_create_doc_and_share.py - - cp /tmp/repo/nextcloud_docs_collaboration.py /tmp/nextcloud_docs_collaboration.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -47,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_user.py firefox + command: python3 /tmp/repo/nextcloud_create_user.py firefox note: Create user read-notes-stdout: true log-stdout: true @@ -56,7 +41,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_doc_and_share.py firefox + command: python3 /tmp/repo/nextcloud_create_doc_and_share.py firefox note: Create document and share read-notes-stdout: true log-stdout: true @@ -65,7 +50,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_docs_collaboration.py firefox + command: python3 /tmp/repo/nextcloud_docs_collaboration.py firefox note: dev read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-event-chromium.yml b/energy-tests/usage_scenario-sqlite-event-chromium.yml index 52368a0d..d5275590 100644 --- a/energy-tests/usage_scenario-sqlite-event-chromium.yml +++ b/energy-tests/usage_scenario-sqlite-event-chromium.yml @@ -7,33 +7,20 @@ compose-file: !include compose-sqlite.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -42,7 +29,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py + command: python3 /tmp/repo/nextcloud_create_event.py note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-event-firefox.yml b/energy-tests/usage_scenario-sqlite-event-firefox.yml index cf8096cf..d5ab910c 100644 --- a/energy-tests/usage_scenario-sqlite-event-firefox.yml +++ b/energy-tests/usage_scenario-sqlite-event-firefox.yml @@ -7,33 +7,20 @@ compose-file: !include compose-sqlite.yml services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_create_event.py /tmp/nextcloud_create_event.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -42,7 +29,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_create_event.py firefox + command: python3 /tmp/repo/nextcloud_create_event.py firefox note: Creating event read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-talk-chromium.yml b/energy-tests/usage_scenario-sqlite-talk-chromium.yml index 027c46c1..a84d97aa 100644 --- a/energy-tests/usage_scenario-sqlite-talk-chromium.yml +++ b/energy-tests/usage_scenario-sqlite-talk-chromium.yml @@ -10,33 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py + command: python3 /tmp/repo/nextcloud_install.py note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -45,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py + command: python3 /tmp/repo/nextcloud_talk.py note: Starting conversation read-notes-stdout: true read-sci-stdout: true diff --git a/energy-tests/usage_scenario-sqlite-talk-firefox.yml b/energy-tests/usage_scenario-sqlite-talk-firefox.yml index d25dc0e8..7d7d3610 100644 --- a/energy-tests/usage_scenario-sqlite-talk-firefox.yml +++ b/energy-tests/usage_scenario-sqlite-talk-firefox.yml @@ -10,33 +10,20 @@ sci: services: gcb-playwright: image: greencoding/gcb_playwright:v3 - setup-commands: - - cp /tmp/repo/nextcloud_install.py /tmp/nextcloud_install.py - - cp /tmp/repo/nextcloud_talk.py /tmp/nextcloud_talk.py - - networks: - - nextcloud-setup-network - # volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - # environment: - # DISPLAY: ":0" - - # We don't need the volumes are we don't want to persist any data - - nc: - volumes: [] - networks: - - nextcloud-setup-network - -networks: - nextcloud-setup-network: + depends_on: + nc: + condition: service_healthy + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode + environment: + DISPLAY: ":0" # for debugging in non-headless mode flow: - name: Install Nextcloud container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_install.py firefox + command: python3 /tmp/repo/nextcloud_install.py firefox note: Installing Nextcloud read-notes-stdout: true log-stdout: true @@ -45,7 +32,7 @@ flow: container: gcb-playwright commands: - type: console - command: python3 /tmp/nextcloud_talk.py firefox + command: python3 /tmp/repo/nextcloud_talk.py firefox note: Starting conversation read-notes-stdout: true read-sci-stdout: true