From be2c312bbca90972a7c43a30859f6dffa8bfe7fa Mon Sep 17 00:00:00 2001 From: Mateusz Kowalkowski Date: Tue, 24 Oct 2023 20:16:29 +0200 Subject: [PATCH] verify docker ps --- .github/workflows/docker-image.yml | 12 ++++++++++-- robot_tests/home-https.robot | 8 ++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 19ee836..930ccbd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -24,6 +24,7 @@ jobs: run: | openssl req -x509 -newkey rsa:4096 -nodes -out app/cert.pem -keyout app/key.pem -days 1 -subj "/C=PL/ST=State/L=/O=/OU=/CN=localhost" + - name: Build and Run Docker image run: | IMAGE_NAME="zostaw/multiarch-home-page" @@ -31,12 +32,18 @@ jobs: docker build -t $IMAGE_NAME:$IMAGE_TAG . docker compose up -d + - name: Create Docker Network + run: docker network create my-network + + - name: attach to network + run: docker network connect my-network home-page-home-page-1 + - name: Verify in next job run: | - sleep 10 + sleep 3 docker ps - - name: wget localhost + - name: Wget localhost run: | wget --no-check-certificate --mirror --page-requisites --convert-links \ --no-parent -P downloaded-site https://localhost:8080 @@ -45,6 +52,7 @@ jobs: uses: joonvena/robotframework-docker-action@v1.0 with: browser: chrome + network: my-network - name: Upload test results uses: actions/upload-artifact@v1 diff --git a/robot_tests/home-https.robot b/robot_tests/home-https.robot index 459d009..a010b2e 100644 --- a/robot_tests/home-https.robot +++ b/robot_tests/home-https.robot @@ -1,19 +1,19 @@ *** Settings *** -Documentation Simple example using SeleniumLibrary. +Documentation Open Page using SeleniumLibrary. Library SeleniumLibrary *** Variables *** -${LOGIN URL} https://localhost:8080/ +${URL} https://home-page-home-page-1:8080 ${BROWSER} Chrome ${Options} options=add_argument("--ignore-certificate-errors") *** Test Cases *** -Valid Login +Open Page Welcome Page Should Be Open [Teardown] Close Browser *** Keywords *** Welcome Page Should Be Open - Open Browser ${LOGIN URL} ${BROWSER} ${Options} + Open Browser ${URL} ${BROWSER} ${Options} Title Should Be Mateusz Kowalkowski