From 75d2be7db722e29bcbc7a05445d85f4be66058eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Fri, 5 May 2023 09:39:22 -0400 Subject: [PATCH] Update tests-ui to fix them --- tests/ui/Dockerfile | 17 ++++++++++------- tests/ui/docker-compose.tests.yml | 20 -------------------- tests/ui/main.py | 2 ++ tests/ui/test.zip | Bin 196 -> 0 bytes 4 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 tests/ui/docker-compose.tests.yml delete mode 100644 tests/ui/test.zip diff --git a/tests/ui/Dockerfile b/tests/ui/Dockerfile index 5cae0be56..fd67775ea 100644 --- a/tests/ui/Dockerfile +++ b/tests/ui/Dockerfile @@ -13,6 +13,14 @@ RUN GECKODRIVER_VERSION=`curl -i https://github.com/mozilla/geckodriver/releases WORKDIR /opt/tests_ui +COPY requirements.txt . + +RUN pip install --no-cache -r requirements.txt + +RUN touch test.txt && \ + zip -r test.zip test.txt && \ + rm test.txt + RUN echo '{ \ "id": "discord", \ "order": 999, \ @@ -29,13 +37,8 @@ RUN echo '{ \ RUN apk del .build-deps && \ rm -rf /var/cache/apk/* +COPY main.py . + ENV PYTHONUNBUFFERED=1 -COPY requirements.txt . - -RUN pip install -r requirements.txt - -COPY main.py . -COPY test.zip . - CMD ["python3", "main.py"] diff --git a/tests/ui/docker-compose.tests.yml b/tests/ui/docker-compose.tests.yml deleted file mode 100644 index acb7e41a8..000000000 --- a/tests/ui/docker-compose.tests.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: "3.5" - -services: - ui-tests: - build: - context: . - dockerfile: Dockerfile - environment: - - PYTHONUNBUFFERED=1 - extra_hosts: - - "www.example.com:192.168.0.2" - - "app1.example.com:192.168.0.2" - networks: - bw-services: - ipv4_address: 192.168.0.3 - -networks: - bw-services: - external: - name: bw-services diff --git a/tests/ui/main.py b/tests/ui/main.py index 8481fa9a0..7021f27ef 100644 --- a/tests/ui/main.py +++ b/tests/ui/main.py @@ -909,6 +909,8 @@ try: False, ) + sleep(2) + print( "The bad plugin has been rejected, trying to add a good plugin ...", flush=True, diff --git a/tests/ui/test.zip b/tests/ui/test.zip deleted file mode 100644 index 3f6a0e205a62d8003055d13b549686848291dcb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 196 zcmWIWW@Zs#-~d9E&e@?1NPvSufuSU|xJ0j{q9ingmw|n$#Oh=iF0J5ZU}Sm0%)kI9 zm>B}R**QR(nV=>Fcr!AIFr%6blLMIy16vwFEMn~m@MdKLsb>VjFd!WP;xGUJ<@_M*