Skip to content

Commit 621ab7c

Browse files
committed
Run testing also for HTTPS.
1 parent 438e2e9 commit 621ab7c

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- name: Install dependencies from APT
1616
run: sudo apt-get install -y libev-dev gcc libc6-dev
17+
- name: Generate server certificates
18+
run: sh ./t/generate-certificates.sh
1719
- name: Install Roswell
1820
env:
1921
LISP: ${{ matrix.lisp }}
@@ -24,6 +26,8 @@ jobs:
2426
run: ros -e '(ql-dist:install-dist "http://dist.ultralisp.org/" :prompt nil)'
2527
- name: Install Rove
2628
run: ros install rove
29+
- name: Install the latest Clack (for HTTPS testing with clack-test)
30+
run: ros install fukamachi/clack
2731
- name: Run tests
2832
env:
2933
LISP: ${{ matrix.lisp }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ benchmark/benchmark.log
1212
.qlot/
1313
qlfile
1414
qlfile.lock
15+
t/certs/

t/generate-certificates.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
mkdir t/certs
4+
cd t/certs
5+
6+
openssl genrsa -out localCA.key 2048
7+
openssl req -batch -new -key localCA.key -out localCA.csr \
8+
-subj "/C=JP/ST=Tokyo/L=Chuo-ku/O=\"Woo\"/OU=Development/CN=localhost"
9+
openssl x509 -req -days 3650 -signkey localCA.key -in localCA.csr -out localCA.crt
10+
openssl x509 -text -noout -in localCA.crt
11+
openssl genrsa -out localhost.key 2048
12+
openssl req -batch -new -key localhost.key -out localhost.csr \
13+
-subj "/C=JP/ST=Tokyo/L=Chuo-ku/O=\"Woo\"/OU=Development/CN=localhost"
14+
echo 'subjectAltName = DNS:localhost, DNS:localhost.localdomain, IP:127.0.0.1, DNS:app, DNS:app.localdomain' > localhost.csx
15+
openssl x509 -req -days 1825 -CA localCA.crt -CAkey localCA.key -CAcreateserial -in localhost.csr -extfile localhost.csx -out localhost.crt

t/woo.lisp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@
66

77
(deftest woo-server-tests
88
(clack.test.suite:run-server-tests :woo))
9+
10+
(deftest woo-ssl-server-tests
11+
(let ((clack.test:*clackup-additional-args*
12+
'(:ssl-cert-file #P"t/certs/localhost.crt"
13+
:ssl-key-file #P"t/certs/localhost.key"))
14+
(dex:*not-verify-ssl* t)
15+
(clack.test:*use-https* t))
16+
(clack.test.suite:run-server-tests :woo)))

0 commit comments

Comments
 (0)