mirror of
https://github.com/zoriya/cish.git
synced 2025-12-06 07:16:16 +00:00
31 lines
739 B
Bash
31 lines
739 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
cish add pathfilter
|
|
cd ./auth
|
|
pathfilter ./auth
|
|
|
|
cish start postgres:15 \
|
|
--port 5432:5432 \
|
|
-e POSTGRES_USER=kyoo \
|
|
-e POSTGRES_PASSWORD=password \
|
|
--health-cmd pg_isready \
|
|
--health-interval 10s \
|
|
--health-timeout 5s \
|
|
--health-retries 5 \
|
|
|
|
cish add hurk go
|
|
|
|
go mod download
|
|
go build -o ./keibi
|
|
|
|
export PGHOST=localhost
|
|
export FIRST_USER_CLAIMS='{"permissions": ["users.read"]}'
|
|
export KEIBI_APIKEY_HURL=1234apikey
|
|
export KEIBI_APIKEY_HURL_CLAIMS='{"permissions": ["apikeys.write", "apikeys.read"]}'
|
|
./keibi > logs &
|
|
trap 'cat logs' EXIT
|
|
wget --retry-connrefused --retry-on-http-error=502 http://localhost:4568/auth/health
|
|
|
|
hurl --error-format long --variable host=http://localhost:4568/auth tests/*
|