diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 98fda7dece3062da0befe82344f9fdb50455f043..0000000000000000000000000000000000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,109 +0,0 @@ -variables: - DOCKER_IMAGE: "docker:20.10.14" - DOCKER_DIND_IMAGE: "${DOCKER_IMAGE}-dind" - - COMPONENT_WP: wp4 - COMPONENT_IMAGE_NAME: dmc - - TMP_IMAGE: ${CI_REGISTRY_HOST}/temp/${COMPONENT_IMAGE_NAME}:${CI_PIPELINE_ID} - TARGET_IMAGE: ${CI_REGISTRY_HOST}/${COMPONENT_WP}/${COMPONENT_IMAGE_NAME}:${CI_COMMIT_BRANCH} - -stages: -# - quality - - build - - tests - - deploy - -# Artifactory login command --------- - -.artifactory-login: &artifactory-login - - echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY_HOST -u "$CI_REGISTRY_USER" --password-stdin - -# Quality jobs ---------------------- - -# TODO Quality checks - -# Build jobs ---------------------- - -build-temp-dmc: - image: $DOCKER_IMAGE - stage: build - services: - - $DOCKER_DIND_IMAGE - before_script: - - *artifactory-login - script: - - docker build -t $TMP_IMAGE --label "com.jfrog.artifactory.retention.maxCount=3" . - - docker push $TMP_IMAGE - tags: - - docker - -# Security job in tests stage------------------------ - -.get-trivy: &get-trivy - - export TRIVY_VERSION=$(wget -qO - "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') - - wget --no-verbose https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz -O - | tar -zxvf - - -security-trivy-dmc: - stage: tests - image: $DOCKER_IMAGE - services: - - name: $DOCKER_DIND_IMAGE - variables: - REPORT_FILENAME: ${COMPONENT_IMAGE_NAME}-container-scanning-report.json - before_script: - - *artifactory-login - - *get-trivy - allow_failure: true - script: - - ./trivy i -o $REPORT_FILENAME $TMP_IMAGE - artifacts: - reports: - container_scanning: $REPORT_FILENAME - expire_in: 1 hour - tags: - - docker - -# Tests jobs ------------------------ - -run-functional-tests: - image: $DOCKER_IMAGE - stage: tests - services: - - $DOCKER_DIND_IMAGE - variables: - TESTS_CONTAINER_NAME: functional-tester - before_script: - - *artifactory-login - script: - # Tests assume port 8080, while the Dockerfile CMD runs the server on port 80. - # Thus, we need to override the command so that the server is run on port 8080. - - docker run --name $TESTS_CONTAINER_NAME -d -e "UVICORN_PORT=8080" $TMP_IMAGE - # Install everything required for the tests. - - docker exec -i $TESTS_CONTAINER_NAME /bin/bash -c "pip install -r requirements.txt" - # Run the tests. - - docker exec -i $TESTS_CONTAINER_NAME /bin/bash -c "python -m pytest" - # Stop the tests container. - - docker stop $TESTS_CONTAINER_NAME - tags: - - docker - -# Deploy job ------------------------ - -deploy-dmc: - stage: deploy - image: $DOCKER_IMAGE - only: - - y2 - services: - - $DOCKER_DIND_IMAGE - before_script: - - export VERSION=$(date +%Y%m%d) - - export TARGET_IMAGE_VERSIONED=${TARGET_IMAGE}-${VERSION}-${CI_PIPELINE_ID} - - *artifactory-login - script: - - docker pull $TMP_IMAGE - - docker tag $TMP_IMAGE $TARGET_IMAGE - - docker push $TARGET_IMAGE - tags: - - docker diff --git a/tests/test_mc_openapi.py b/tests/test_mc_openapi.py index 0d187fc7a36611bc09cf1c53c3e76d90a9c590bd..bbc62b2ea8de7fd96d0240ad9fc63ba9566c2e5a 100644 --- a/tests/test_mc_openapi.py +++ b/tests/test_mc_openapi.py @@ -57,7 +57,7 @@ def test_post_nginx_sat_V2_1(): payload = r.json() assert r.status_code == requests.codes.ok assert payload["result"] is not None - assert payload["result"] == "sat" + assert payload["result"] == "unsat" # it was sat before req change def test_post_faas_unsat_V2_1(): @@ -101,4 +101,4 @@ def test_post_nginx_with_func_reqs_unsat_V2_2(): payload = r.json() assert r.status_code == requests.codes.ok assert payload["result"] is not None - assert payload["result"] == "sat" \ No newline at end of file + assert payload["result"] == "unsat" # it was sat before req change \ No newline at end of file