Back to pure docker for testing
This commit is contained in:
20
Justfile
20
Justfile
@@ -20,18 +20,12 @@ lint-fix:
|
|||||||
release:
|
release:
|
||||||
cargo build --release --target {{target}}
|
cargo build --release --target {{target}}
|
||||||
|
|
||||||
test-binary-docker:
|
test-binary:
|
||||||
env \
|
env \
|
||||||
GITHUB_API_BASEURL=http://rest:5000/github \
|
GITHUB_API_BASEURL=http://rest:5000/github \
|
||||||
GITLAB_API_BASEURL=http://rest:5000/gitlab \
|
GITLAB_API_BASEURL=http://rest:5000/gitlab \
|
||||||
cargo build --target {{target}} --profile e2e-tests --features=static-build
|
cargo build --target {{target}} --profile e2e-tests --features=static-build
|
||||||
|
|
||||||
test-binary:
|
|
||||||
env \
|
|
||||||
GITHUB_API_BASEURL=http://localhost:5000/github \
|
|
||||||
GITLAB_API_BASEURL=http://localhost:5000/gitlab \
|
|
||||||
cargo build --target {{target}} --profile e2e-tests
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cargo install --path .
|
cargo install --path .
|
||||||
|
|
||||||
@@ -46,7 +40,7 @@ test-unit:
|
|||||||
test-integration:
|
test-integration:
|
||||||
cargo test --test "*"
|
cargo test --test "*"
|
||||||
|
|
||||||
test-e2e-docker +tests=".": test-binary-docker
|
test-e2e +tests=".": test-binary
|
||||||
cd ./e2e_tests \
|
cd ./e2e_tests \
|
||||||
&& docker-compose rm --stop -f \
|
&& docker-compose rm --stop -f \
|
||||||
&& docker-compose build \
|
&& docker-compose build \
|
||||||
@@ -54,15 +48,7 @@ test-e2e-docker +tests=".": test-binary-docker
|
|||||||
--rm \
|
--rm \
|
||||||
-v $PWD/../target/{{target}}/e2e-tests/grm:/grm \
|
-v $PWD/../target/{{target}}/e2e-tests/grm:/grm \
|
||||||
pytest \
|
pytest \
|
||||||
"GRM_BINARY=/grm python3 ALTERNATE_DOMAIN=alternate-rest -m pytest -p no:cacheprovider --color=yes "$@"" \
|
"GRM_BINARY=/grm ALTERNATE_DOMAIN=alternate-rest python3 -m pytest -p no:cacheprovider --color=yes "$@"" \
|
||||||
&& docker-compose rm --stop -f
|
|
||||||
|
|
||||||
test-e2e +tests=".": test-binary
|
|
||||||
cd ./e2e_tests \
|
|
||||||
&& docker-compose rm --stop -f \
|
|
||||||
&& docker-compose build \
|
|
||||||
&& docker-compose up -d rest \
|
|
||||||
&& GRM_BINARY={{justfile_directory()}}/target/{{target}}/e2e-tests/grm ALTERNATE_DOMAIN=127.0.0.1 python3 -m pytest -p no:cacheprovider --color=yes {{tests}} \
|
|
||||||
&& docker-compose rm --stop -f
|
&& docker-compose rm --stop -f
|
||||||
|
|
||||||
update-dependencies: update-cargo-dependencies
|
update-dependencies: update-cargo-dependencies
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ services:
|
|||||||
build: ./docker-rest/
|
build: ./docker-rest/
|
||||||
expose:
|
expose:
|
||||||
- "5000"
|
- "5000"
|
||||||
ports:
|
|
||||||
- "5000:5000"
|
|
||||||
networks:
|
networks:
|
||||||
main:
|
main:
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
Reference in New Issue
Block a user