Skip to content

Commit

Permalink
Fix http BBE assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldclakmal committed Jul 31, 2023
1 parent e719112 commit 7d4394e
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bbes/http/assert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ assertNotEmpty() {
}

assertEquals() {
if [[ $1 != $2 ]]; then
if [[ "$1" != "$2" ]]; then
echo "Expected: '$2'"
echo "Actual: '$1'"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion bbes/http/http_basic_auth_file_store.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_basic_auth_ldap_store.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_jwt_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_mtls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_oauth2_bearer_token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_oauth2_client_credentials_grant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_oauth2_jwt_bearer_grant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_oauth2_password_grant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_oauth2_refresh_token_grant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"
2 changes: 1 addition & 1 deletion bbes/http/http_ssl_tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ bal run bbe/service.bal &
sleep 10s
response=$(bal run bbe/client.bal 2>&1 | tail -n 1)
assertNotEmpty "$response"
assertEquals "$response" "Hello, World!"
assertEquals "$response" "[{\"title\":\"Blue Train\",\"artist\":\"John Coltrane\"},{\"title\":\"Jeru\",\"artist\":\"Gerry Mulligan\"}]"

0 comments on commit 7d4394e

Please sign in to comment.