diff options
author | Victor Näslund <victor@sunet.se> | 2022-11-01 01:55:25 +0100 |
---|---|---|
committer | Victor Näslund <victor@sunet.se> | 2022-11-01 01:55:25 +0100 |
commit | ffb26f4a81a9ca61c4105df037f7e1beb8dc5fb0 (patch) | |
tree | 41094f051edbf300a6cd2c2de8dfb8435bfc18a4 /dev-run.sh | |
parent | 1b836e78db2737ba5d1ae43da9828601a5a5c114 (diff) |
initial fresh up
Diffstat (limited to 'dev-run.sh')
-rwxr-xr-x | dev-run.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-run.sh b/dev-run.sh new file mode 100755 index 0000000..7847063 --- /dev/null +++ b/dev-run.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +bash quickstart.sh -b || exit 1 +sleep 2 +JWT=$(curl -k http://localhost:8000/api/v1.0/auth -X POST -p -u usr:pwd | jq -r .access_token) || exit 1 +curl -k --data-binary @example_data_1.json -H "Authorization: Bearer $JWT" https://localhost:1443/sc/v0/add || exit 1 +exit 0 + +echo "Checking package" +mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/dev/null src/*.py || exit 1 +black --line-length 120 src/*.py || exit 1 +pylint --max-line-length 120 src/*.py || exit 1 + +echo "Checking tests" +#mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/dev/null tests/*.py || exit 1 +#black --line-length 120 tests/*.py || exit 1 +#pylint --max-line-length 120 tests/*.py || exit 1 + +# Stop old container, build and run the new one +# docker build -t pkcs11_ca_service_http . +# docker stop /pkcs11_ca_service_http +# docker rm /pkcs11_ca_service_http +# docker run \ +# --name pkcs11_ca_service_http \ +# --net pkcs11_ca_service_network \ +# --restart always \ +# --security-opt no-new-privileges \ +# --cap-drop all \ +# --read-only \ +# --memory 256m \ +# --cpus 2.75 \ +# --mount type=tmpfs,target=/dev/shm,readonly=true \ +# -v /app_softhsm:/var/lib/softhsm/tokens \ +# -p 8000:8000 \ +# -d \ +# pkcs11_ca_service_http + +# sleep 2 +# echo "Running tests" +# python3 -m unittest + |