44SCRIPT_DIR=$( dirname " $( readlink -f " $0 " ) " )
55mkdir -p /root/.config/atest
66mkdir -p /var/data
7- cd " /var/data "
7+
88# Generate private key
99openssl genrsa -out server.key 2048
1010# Generate self-signed certificate
1111openssl req -new -x509 -key server.key -out server.crt -days 36500 \
12- -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
12+ -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
1313# Generate Certificate Signing Request (CSR)
1414openssl req -new -key server.key -out server.csr \
15- -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
15+ -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
1616# Generate a new private key
1717openssl genpkey -algorithm RSA -out test.key
1818# Generate a new CSR
1919openssl req -new -nodes -key test.key -out test.csr -days 3650 \
20- -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
21- -config " $SCRIPT_DIR / openssl.cnf" -extensions v3_req
20+ -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
21+ -config " openssl.cnf" -extensions v3_req
2222# Sign the new CSR with the self-signed certificate
2323openssl x509 -req -days 365 -in test.csr \
24- -out test.pem -CA server.crt -CAkey server.key \
25- -CAcreateserial -extfile " $SCRIPT_DIR /openssl.cnf" -extensions v3_req
24+ -out test.pem -CA server.crt -CAkey server.key \
25+ -CAcreateserial -extfile " openssl.cnf" -extensions v3_req
26+
27+ echo " start to download extenions"
28+ atest extension --output /usr/local/bin --registry ghcr.io git
29+ atest extension --output /usr/local/bin --registry ghcr.io orm
30+ atest extension --output /usr/local/bin --registry ghcr.io etcd
31+ atest extension --output /usr/local/bin --registry ghcr.io mongodb
2632
27- nohup atest server --tls-grpc --cert-file /var/data/test.pem --key-file /var/data/test.key&
28- cmd=" atest run -p test-suite-common.yaml --report github --report-github-identity e2e-testing --report-file /var/data/report.json --report-github-repo linuxsuren/api-testing --report-github-pr ${PULL_REQUEST:- 0} "
33+ echo " start to run server"
34+ nohup atest server --tls-grpc --cert-file test.pem --key-file test.key&
35+ cmd=" atest run -p test-suite-common.yaml"
2936
3037echo " start to run testing: $cmd "
3138kind=orm target=mysql:3306 driver=mysql $cmd
@@ -47,4 +54,3 @@ kind=orm target=postgres:5432 driver=postgres $cmd
4754# kind=s3 target=minio:9000 atest run -p test-suite-common.yaml
4855
4956cat /root/.config/atest/stores.yaml
50- exit 0
0 commit comments