Giter Site home page Giter Site logo

jakub007d / insights-behavioral-spec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhatinsights/insights-behavioral-spec

0.0 0.0 0.0 2.53 MB

Behavioral specifications for Insights pipelines and its integration into OCM, OCP, and ACM

License: Apache License 2.0

Shell 2.91% Python 15.23% Makefile 0.27% Dockerfile 0.06% Gherkin 81.53%

insights-behavioral-spec's Introduction

insights-behavioral-spec

GitHub Pages License made-with-python

Behavioral specifications for Insights pipelines and its integration into OCM, OCP, ACM, Notification Service, and ServiceLog. Specifications are written in Gherkin language, test steps implementations are written in Python 3.x.

How to run the scenarios

Optional: Use the run_in_docker.sh script explained in the additional tools documentation.

Spin up the docker containers

docker-compose up -d
docker-compose --profile test-exporter up -d
POSTGRES_DB_NAME=notification docker-compose --profile test-notification-services up -d

The POSTGRES_DB_NAME environment variable, which defaults to the value test, is mandatory when starting tests related to the notification services. This is because the different services expect different database names: notification is used by services related with notification service, and test for the rest.

If you don't want to spin up the containers, you'll need to locally run the required services (database, Kafka, etc.). You may need to add or remove the managed tag in the ${SERVICE}_tests.sh.

NOTE: Don't forget to set up PATH environment variable correctly when running tests both within and outside containers. That environment variable needs to contain the path with tested executable files (for example insights-results-aggregator-cleaner etc.).

When running the tests within the docker containers, it is necessary to have said executable under the $VIRTUAL_ENV_BIN folder with the right permissions. For example, after compiling insights-results-aggregator:

docker cp insights-results-aggregator $cid:`docker exec $cid bash -c 'echo "$VIRTUAL_ENV_BIN"'`
docker exec -u root $cid /bin/bash -c 'chmod +x $VIRTUAL_ENV_BIN/insights-results-aggregator'

The tests for our Python-based services need a similar setup, but the whole source code of the service would need to be copied inside the container. It is more useful to setup a volume that matches the path where the service is expected to be found.

If you want to run the real dependencies (content-service and service log), run POSTGRES_DB_NAME=<test|notification> docker-compose --profile no-mock up -d instead and export WITHMOCK=0.

Run the tests using the Makefile targets

A simple example:

make notification-service

The targets that can be used are listed in the makefile targets documentation

List of existing behavioral specifications (features)

All features are listed on this page

List of scenarios

List of scenarios can be seen there

List of tags

It is possible to filter test scenarios to be run not only by project name but also by using tag or tags. List of all tags used in test scenarios are listed on this page

Makefile targets

Please look at this page

Additional tools

This repository contains additional tools and helpers. Description of such tools can be found on this page

insights-behavioral-spec's People

Contributors

tisnik avatar epapbak avatar juandspy avatar jiripapousek avatar joselsegura avatar bee-lee avatar dpensi avatar red-hat-konflux[bot] avatar matysek avatar jakub007d avatar adamrdrew avatar falox avatar gkarat avatar xxlhacker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.