Skip to content

Commit

Permalink
fix(nginx/debug): Add prefixUri variable to command_test function and…
Browse files Browse the repository at this point in the history
… add ps command
  • Loading branch information
alimd committed Jan 24, 2024
1 parent 34f61c0 commit ae165f8
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions packages/nginx/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,44 +80,51 @@ function command_request() {
}

function command_test() {
local prefixUri=/api/s6

echoStep "Test..."
command_request /api/s5/debug-info-110 --verbose
command_request $prefixUri/debug-info-110 --verbose

echoStep "Test Home..."
command_request /
command_request /api/s5/
command_request $prefixUri/

echoStep "Test Public..."
command_request /api/s5/p/post-list.col.asj
command_request $prefixUri/p/post-list.col.asj

echoStep "Test Secret..."
command_request /api/s5/.s/.store.col.asj
command_request $prefixUri/.s/.store.col.asj

echoStep "Test Authentificated..."
command_request /api/s5/a/posts/intro-to-alwatr-store.doc.asj
command_request $prefixUri/a/posts/intro-to-alwatr-store.doc.asj

echoStep "Test Managers..."
command_request /api/s5/m/user-list.col.asj
command_request $prefixUri/m/user-list.col.asj

echoStep "Test PerUser..."
command_request /api/s5/u/Ual/Ual1md1/info.doc.asj
command_request /api/s5/u/Ual/Ual1md1/404.doc.asj
command_request /api/s5/u/Ual/Ual1md2/info.doc.asj
command_request $prefixUri/u/Ual/Ual1md1/info.doc.asj
command_request $prefixUri/u/Ual/Ual1md1/404.doc.asj
command_request $prefixUri/u/Ual/Ual1md2/info.doc.asj

echoStep "Test PerOwner..."
command_request /api/s5/o/D3v/D3v1ce1/info.doc.asj
command_request /api/s5/o/T0k/T0k3n1/info.doc.asj
command_request $prefixUri/o/D3v/D3v1ce1/info.doc.asj
command_request $prefixUri/o/T0k/T0k3n1/info.doc.asj

echoStep "Test Other..."
command_request /api/s5/test.json
command_request /api/s5/p/post-list.col.asj.bak
command_request $prefixUri/test.json
command_request $prefixUri/p/post-list.col.asj.bak
}

function command_exec() {
echoStep "Execute... $@"
remoteShellInPath "docker exec --interactive --tty $containerName $@"
}

function command_ps() {
echoStep "PS... $@"
remoteShellInPath "docker ps --filter 'name=$containerName'"
}

function command_help() {
echo "
Alwatr Store Nginx Debug and test.
Expand All @@ -133,6 +140,7 @@ function command_help() {
rm Down and remove containers and delete all files.
exec Execute a command in a running container.
test Execute tests requests.
ps Show docker status.
docker Direct access to docker.
"
}
Expand Down

0 comments on commit ae165f8

Please sign in to comment.