Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: perf test workflow #3

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/performance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,24 @@ jobs:
with:
go-version-file: 'go.mod'

- run: |
curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" | sudo tee /etc/apt/sources.list.d/httpie.list > /dev/null
sudo apt update
sudo apt install httpie

- run: go mod download

- run: go run cmd/dgate-server/main.go &
- run: |
export PORT=8080
export PORT_SSL=8443
go run cmd/dgate-server/main.go &

- name: Wait for server to start
run: sleep 5
- run: ./functional-tests/admin_tests/performance_test_prep.sh
- run: |
export PROXY_URL=http://localhost:8080
./functional-tests/admin_tests/performance_test_prep.sh

- name: Run local k6 test
uses: grafana/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion config.dgate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ proxy:
namespace: "admin"
patterns: ["admin.*"]
tls:
port: 443
port: ${PORT_SSL:-443}
auto_generate: true
cert_file: .lego/certificates/ufosoup.com.crt
key_file: .lego/certificates/ufosoup.com.key
Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/iphash_load_balancer_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROXY_URL=${PROXY_URL:-"http://localhost"}

DIR="$( cd "$( dirname "$0" )" && pwd )"

CALL='http --check-status -p=mb -F'
CALL='http --ignore-stdin --check-status -p=mb -F'

$CALL PUT ${ADMIN_URL}/namespace \
name=test-lb-ns
Expand All @@ -22,7 +22,7 @@ $CALL ${ADMIN_URL}/domain
MOD_B64="$(base64 < $DIR/iphash_load_balancer.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=printer \
payload=$MOD_B64 \
payload="$MOD_B64" \
namespace=test-lb-ns


Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/merge_responses_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROXY_URL=${PROXY_URL:-"http://localhost"}

DIR="$( cd "$( dirname "$0" )" && pwd )"

CALL='http --check-status -p=mb -F'
CALL='http --ignore-stdin --check-status -p=mb -F'

$CALL PUT ${ADMIN_URL}/namespace \
name=test-ns
Expand All @@ -22,7 +22,7 @@ $CALL ${ADMIN_URL}/domain
MOD_B64="$(base64 < $DIR/merge_responses.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=printer \
payload=$MOD_B64 \
payload="$MOD_B64" \
namespace=test-ns


Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/modify_request_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROXY_URL=${PROXY_URL:-"http://localhost"}

DIR="$( cd "$( dirname "$0" )" && pwd )"

CALL='http --check-status -p=mb -F'
CALL='http --ignore-stdin --check-status -p=mb -F'

$CALL PUT ${ADMIN_URL}/namespace \
name=modify_request_test-ns
Expand All @@ -19,7 +19,7 @@ $CALL PUT ${ADMIN_URL}/domain \

MOD_B64="$(base64 < $DIR/modify_request.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=printer payload=$MOD_B64 \
name=printer payload="$MOD_B64" \
namespace=modify_request_test-ns

$CALL PUT ${ADMIN_URL}/service \
Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/modify_response_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROXY_URL=${PROXY_URL:-"http://localhost"}

DIR="$( cd "$( dirname "$0" )" && pwd )"

CALL='http --check-status -p=mb -F'
CALL='http --ignore-stdin --check-status -p=mb -F'

$CALL PUT ${ADMIN_URL}/namespace \
name=test-ns
Expand All @@ -19,7 +19,7 @@ $CALL PUT ${ADMIN_URL}/domain \

MOD_B64="$(base64 < $DIR/modify_response.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=printer payload=$MOD_B64 \
name=printer payload="$MOD_B64" \
namespace=test-ns

$CALL PUT ${ADMIN_URL}/service \
Expand Down
4 changes: 2 additions & 2 deletions functional-tests/admin_tests/performance_test_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"

# SETUP BASE

CALL='http --check-status -p=mb -F'
CALL='http --ignore-stdin --check-status -p=mb -F'

# domain setup

Expand All @@ -26,7 +26,7 @@ $CALL PUT ${ADMIN_URL}/service \

MOD_B64="$(base64 < $DIR/performance_test_prep.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=test-mod payload=$MOD_B64 \
name=test-mod payload="$MOD_B64" \
namespace=test-ns1

$CALL PUT ${ADMIN_URL}/route \
Expand Down
2 changes: 1 addition & 1 deletion functional-tests/admin_tests/url_shortener_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $CALL PUT ${ADMIN_URL}/collection \
MOD_B64="$(base64 < $DIR/url_shortener.ts)"
$CALL PUT ${ADMIN_URL}/module \
name=printer \
payload=$MOD_B64 \
payload="$MOD_B64" \
namespace=url_shortener-ns

$CALL PUT ${ADMIN_URL}/route \
Expand Down
Loading