Some checks failed
Quality Check / Validate OAS (pull_request) Successful in 36s
Quality Check / Validate OAS (push) Successful in 39s
Quality Check / Static Analysis (push) Failing after 1m7s
Quality Check / Linting (push) Successful in 1m16s
Quality Check / Testing (push) Successful in 1m17s
Quality Check / Static Analysis (pull_request) Failing after 58s
Quality Check / Linting (pull_request) Successful in 1m0s
Quality Check / Testing (pull_request) Successful in 44s
17 lines
543 B
Bash
Executable file
17 lines
543 B
Bash
Executable file
#!/bin/sh
|
|
|
|
response=$(curl -s -X 'POST' \
|
|
'http://localhost:8080/api/v1/player/login' \
|
|
-H 'accept: application/json' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{
|
|
"username": "Player1",
|
|
"password": "1234"
|
|
}')
|
|
|
|
token=$(echo "$response" | jq -r .token)
|
|
payload='{"$id": "RequestConnectionToken", "channel": "time"}'
|
|
response=$(echo "$payload" | websocat ws://localhost:8080/ws/connection -H "Authorization: $token")
|
|
|
|
time_token=$(echo "$response" | jq -r .token)
|
|
websocat ws://localhost:8080/ws/time -H "Authorization: $time_token"
|