mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-16 05:15:03 +00:00
test(caddy): fix automated testing
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -21,7 +21,8 @@
|
|||||||
"golang.go",
|
"golang.go",
|
||||||
"unifiedjs.vscode-mdx",
|
"unifiedjs.vscode-mdx",
|
||||||
"a-h.templ",
|
"a-h.templ",
|
||||||
"redhat.vscode-yaml"
|
"redhat.vscode-yaml",
|
||||||
|
"matthewpi.caddyfile-support"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -5,6 +5,7 @@
|
|||||||
"golang.go",
|
"golang.go",
|
||||||
"unifiedjs.vscode-mdx",
|
"unifiedjs.vscode-mdx",
|
||||||
"a-h.templ",
|
"a-h.templ",
|
||||||
"redhat.vscode-yaml"
|
"redhat.vscode-yaml",
|
||||||
|
"matthewpi.caddyfile-support"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
:80 {
|
caddy.local.cetacean.club {
|
||||||
reverse_proxy http://anubis:3000 {
|
tls internal
|
||||||
header_up X-Real-Ip {remote_host}
|
|
||||||
header_up X-Http-Version {http.request.proto}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:443 {
|
|
||||||
tls /etc/techaro/pki/caddy.local.cetacean.club/cert.pem /etc/techaro/pki/caddy.local.cetacean.club/key.pem
|
|
||||||
|
|
||||||
reverse_proxy http://anubis:3000 {
|
reverse_proxy http://anubis:3000 {
|
||||||
header_up X-Real-Ip {remote_host}
|
header_up X-Real-Ip {remote_host}
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
- 8443:443
|
- 8443:443
|
||||||
volumes:
|
|
||||||
- "../pki/caddy.local.cetacean.club:/etc/techaro/pki/caddy.local.cetacean.club/"
|
|
||||||
|
|
||||||
anubis:
|
anubis:
|
||||||
image: ko.local/anubis
|
image: ko.local/anubis
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
async function testWithUserAgent(userAgent) {
|
async function testWithUserAgent(userAgent) {
|
||||||
const statusCode =
|
const statusCode =
|
||||||
await fetch("https://relayd.local.cetacean.club:8443/reqmeta", {
|
await fetch("https://caddy.local.cetacean.club:8443/reqmeta", {
|
||||||
headers: {
|
headers: {
|
||||||
"User-Agent": userAgent,
|
"User-Agent": userAgent,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,6 @@ docker compose up -d --build
|
|||||||
|
|
||||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
backoff-retry node test.mjs
|
backoff-retry node test.mjs
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ trap cleanup EXIT SIGINT
|
|||||||
function build_anubis_ko() {
|
function build_anubis_ko() {
|
||||||
(
|
(
|
||||||
cd ../.. &&
|
cd ../.. &&
|
||||||
VERSION=devel ko build \
|
KO_DOCKER_REPO=ko.local/anubis VERSION=devel ko build \
|
||||||
--platform=all \
|
--platform=all \
|
||||||
--base-import-paths \
|
--base-import-paths \
|
||||||
--tags="latest" \
|
--tags="latest" \
|
||||||
|
|||||||
Reference in New Issue
Block a user