Skip to content
Snippets Groups Projects
Verified Commit aa8c84c1 authored by Mark's avatar Mark
Browse files

Add gitlab CI application test

parent 53a436bc
No related branches found
No related tags found
1 merge request!1Create behaviour test for the login page
Pipeline #120 failed
stages:
- build
- application-test
consentProvider_image:
stage: build
......@@ -34,3 +35,37 @@ loginProvider_image:
only:
changes:
- login_provider/*
loginProviderCiTest_image:
stage: build
DOCKER_DRIVER: overlay2
image: docker:stable
services:
- docker:18-dind # FIXME This is an older version of DIND. Update when gitlab-runner fixes https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t ${CI_REGISTRY_IMAGE}/login_provider_ci_test:${CI_COMMIT_REF_NAME} login_provider/test/
- docker push ${CI_REGISTRY_IMAGE}/login_provider_ci_test:${CI_COMMIT_REF_NAME}
only:
changes:
- login_provider/*
behave-login:
stage: application-test
services:
- name: ${CI_REGISTRY_IMAGE}/login_provider:${CI_COMMIT_REF_NAME}
alias: login_provider
image: ${CI_REGISTRY_IMAGE}/login_provider_ci_test:${CI_COMMIT_REF_NAME}
script:
- cd login_provider/test/behave/
- python -m behave -D url=http://login_provider -D email=example@oas.example.net -D password=password
artifacts:
paths:
- login_provider/test/behave/screenshots/
expire_in: 1 month
when: on_failure
only:
changes:
- login_provider/*
FROM alpine:3.9
LABEL name="Login_provider CI test image"
RUN apk --no-cache add \
chromium \
chromium-chromedriver \
python3-dev \
python3-pip
RUN pip3 install behave behave_webdriver
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment