blob: 559e602e47532dc35c4f9afebbb5a2d9c10aa4a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/bash
echo "Checking package"
mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/dev/null src/collector/*.py # || exit 1
black --line-length 120 src/collector/*.py # || exit 1
pylint --max-line-length 120 src/collector/*.py # || exit 1
bash quickstart.sh -b || exit 1
sleep 3
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 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
|