Closed gshif closed 4 years ago
Running Litmus locally:
While you are in github.com/influxdata/influxdb: master
get the latest changes.
from github.com/influxdata/influxdb
run make build
. If you run into issues building OSS, take a look at README. That would build influxd
and influx
binaries in github.com/influxdata/influxdb/bin/darwin
dir
Change dir to github.com/influxdata/idpe/litmus: test/litmus-python-3
(you should be in test/litmus-python-3
branch)
Run test(s) or test lists:
python litmus_run_master.py --platform --gateway http://localhost:9999 --boltpath ~/.influxdbv2/influxd.bolt --enginepath ~/.influxdbv2 --binarypath ../../influxdb/bin/darwin/influxd --tests src/cloud/rest_api/members_owners/test_add_owners.py
FYI: please make sure that ~/.influxdbv2
dir does not exist
Another case is to run litmus locally, but influxd would be running from a container:
This would require small change. Currently when the influx
container is starting, we start it with a network_mode='host'
, see line 322-326 in/idpe/litmus/src/cloud/rest_api/conftest.py
that is required to start a container within a container. And this is currently hardcoded since most of use is from CI/CD, i.e. container within container. To make it run locally, this line network_mode='host'
needs to be removed. We can make it configurable in the future, but for now we can either:
python litmus_run_master.py --platform --gateway http://localhost:9999 --dockerimage --tests src/cloud/rest_api/members_owners/test_add_owners.py
@kevinhogan111 is taking running Litmus tests locally
Running Litmus from a docker container (build litmus image while you are in test/litmus-python-3
branch by running command `docker build -f Dockerfile -t
influxd
running inside container. That is what currently being implemented in CircleCI when we run nightly tests.
docker run --entrypoint "./run_litmus_tests_oss.sh" -e TEST_LIST=tests_lists/gateway_api_tests.list -e DOCKERIMAGE=true --net host -v /var/run/docker.sock:/var/run/docker.sock -v ~/Pictures:/Litmus/result <litmus docker image name>
influxd
running locally:
Because Litmus container is running ubuntu
os, the influxd
binary needs to be build in ubuntu. One way of doing it is to get this binary from CircleCI build. TBD@stephanie-engel taking the task of running Litmus from a docker container
Done. Added issues: https://app.zenhub.com/workspaces/coretest-team-5d1f93fc12840865367a0971/issues/influxdata/idpe/7218 https://app.zenhub.com/workspaces/coretest-team-5d1f93fc12840865367a0971/issues/influxdata/idpe/7219 https://app.zenhub.com/workspaces/coretest-team-5d1f93fc12840865367a0971/issues/influxdata/idpe/7220
Added 1 issue from the local OSS runs: https://app.zenhub.com/workspaces/coretest-team-5d1f93fc12840865367a0971/issues/influxdata/idpe/7213
resolved
After making changes to Litmus to run python 3.8.2/pytest 5.4 (+ other required python modules), the first task is to run all of the test suites and identify the failures. The next step would be to fix the issues. Running Cloud 2.0 OSS locally can be done by running
make build
fromgithub.com/influxdata/influxdb: master
Need to run tests in 2 ways (See README.md for running tests using Litmus container or locally.)