Commit 148f386d authored by Isabella Almeida da Silva's avatar Isabella Almeida da Silva
Browse files

[SOMA-2553][SOMA-2624] Documentar o curl para testes da chamada ao SGA com token no header

- Editado o request.sh já existente para adicionar o token fake no header para testes
- Pequena refatoração para facilitar a edição local do script
parent ada8307e
#!/bin/sh
export SGA_NAME="chuva"
export SGA_BASE_URL="http://localhost:12345"
case "$1" in
job)
curl -v -H "Content-Type: application/json" -X POST -d '{
"cmd_string": "./hello.sh",
"cmd_id": "gobo",
"parameters": {"foo": "bar" }
}' 'http://localhost:12345/v1/sga/chuva/job'
curl -v -H "Content-Type: application/json" -H 'Authorization: USER_TOKEN' -X POST -d '{
"cmd_string": "echo hello && sleep 10 && echo bye > /tmp/job_123.out ",
"cmd_id": "job_123",
"parameters": {
"csbase_command_path": "/tmp",
"csbase_command_root_path":"/tmp",
"csbase_command_output_path":"/tmp",
"csbase_command_sandbox_paths.1":"/tmp/job_123",
}
}' $SGA_BASE_URL'/v1/sga/'$SGA_NAME'/job'
;;
status)
......@@ -16,11 +24,11 @@ status)
then
num=123
fi
curl -v 'http://localhost:12345/v1/sga/chuva/job/'$num'/status'
curl -v $SGA_BASE_URL'/v1/sga/'$SGA_NAME'/job/'$num'/status'
;;
path)
curl -v 'http://localhost:12345/v1/sga/chuva/path?name='$2
curl -v $SGA_BASE_URL'/v1/sga/'$SGA_NAME'/path?name='$2
;;
esac
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment