Skip to content

Commit

Permalink
style: apply linters automatic fixes (#1465)
Browse files Browse the repository at this point in the history
Signed-off-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Co-authored-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
  • Loading branch information
github-actions[bot] and hyperledger-bot authored Nov 27, 2024
1 parent 13375d0 commit afa850e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
41 changes: 22 additions & 19 deletions infrastructure/shared/docker-compose-combined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
ports:
- "127.0.0.1:5431:5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres", "-d", "node_db" ]
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "node_db"]
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -77,21 +77,21 @@ services:
timeout: 5s
retries: 5

# pgadmin:
# image: dpage/pgadmin4
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
# PGADMIN_CONFIG_SERVER_MODE: "False"
# volumes:
# - pgadmin:/var/lib/pgadmin
# ports:
# - "127.0.0.1:${PGADMIN_PORT:-5050}:80"
# depends_on:
# db:
# condition: service_healthy
# profiles:
# - debug
# pgadmin:
# image: dpage/pgadmin4
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
# PGADMIN_CONFIG_SERVER_MODE: "False"
# volumes:
# - pgadmin:/var/lib/pgadmin
# ports:
# - "127.0.0.1:${PGADMIN_PORT:-5050}:80"
# depends_on:
# db:
# condition: service_healthy
# profiles:
# - debug

##########################
# Services
Expand Down Expand Up @@ -172,7 +172,8 @@ services:
vault-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://cloud-agent-issuer:8085/_system/health"]
test:
["CMD", "curl", "-f", "http://cloud-agent-issuer:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -245,7 +246,8 @@ services:
vault-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://cloud-agent-holder:8085/_system/health"]
test:
["CMD", "curl", "-f", "http://cloud-agent-holder:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -318,7 +320,8 @@ services:
vault-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://cloud-agent-verifier:8085/_system/health"]
test:
["CMD", "curl", "-f", "http://cloud-agent-verifier:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand Down
34 changes: 16 additions & 18 deletions tests/performance-tests/agent-performance-tests-k6/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ function startAllAgents() {
echo "Starting agents"

local DOCKERHOST="host.docker.internal"
local NODE_REFRESH_AND_SUBMIT_PERIOD="1s"
local NODE_MOVE_SCHEDULED_TO_PENDING_PERIOD="1s"
local NODE_WALLET_MAX_TPS="1000"
local NODE_REFRESH_AND_SUBMIT_PERIOD="1s"
local NODE_MOVE_SCHEDULED_TO_PENDING_PERIOD="1s"
local NODE_WALLET_MAX_TPS="1000"
local ADMIN_TOKEN=admin
local DEFAULT_WALLET_ENABLED=true
local DEFAULT_WALLET_AUTH_API_KEY=default
local API_KEY_AUTO_PROVISIONING=false
local API_KEY_ENABLED=true

echo "Issuer Port [$ISSUER_PORT]"
echo "Holder Port [$HOLDER_PORT]"
echo "VerifierPort [$VERIFIER_PORT]"
echo "Issuer Port [$ISSUER_PORT]"
echo "Holder Port [$HOLDER_PORT]"
echo "VerifierPort [$VERIFIER_PORT]"

ADMIN_TOKEN="${ADMIN_TOKEN}" \
ADMIN_TOKEN="${ADMIN_TOKEN}" \
DEFAULT_WALLET_ENABLED="${DEFAULT_WALLET_ENABLED}" \
DEFAULT_WALLET_AUTH_API_KEY="${DEFAULT_WALLET_AUTH_API_KEY}" \
API_KEY_AUTO_PROVISIONING="${API_KEY_AUTO_PROVISIONING}" \
Expand All @@ -45,27 +45,26 @@ function startAllAgents() {

function stopAllAgents() {
echo "Stopping agents"
docker compose \
docker compose \
-f "${DOCKERFILE}" \
--env-file "${ENV_FILE}" down -v 2>/dev/null
echo "Agents stopped"
}


# clean up on finish
function cleanup() {
local exit_code=$?
if [[ $exit_code -eq 0 ]]; then
echo "Script exited normally with code $exit_code."
else
echo "Script exited with error code $exit_code."
fi
local exit_code=$?
if [[ $exit_code -eq 0 ]]; then
echo "Script exited normally with code $exit_code."
else
echo "Script exited with error code $exit_code."
fi
echo "Removing K6 binaries"
rm k6
rm "$K6_ZIP_FILE"
echo "Stopping All Agents"
stopAllAgents
echo "cleanup complete"
stopAllAgents
echo "cleanup complete"
}

trap 'cleanup' EXIT
Expand Down Expand Up @@ -102,7 +101,6 @@ export VERIFIER_AGENT_URL="http://localhost:${VERIFIER_PORT}/cloud-agent"

startAllAgents


# yarn install
echo "Installing dependencies"
yarn -s >/dev/null
Expand Down

0 comments on commit afa850e

Please sign in to comment.