You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
I am just started to learn the Docker technology. Using book "Docker on Amazon Web Services" by Justin Menga.
There is an example using the acceptance.bats file with the script
While run I get error message
acceptance_1 | # (in test file acceptance.bats, line 26)
acceptance_1 | # `[ $(curl ${BASH_REMATCH[1]} | jq '.title') = $"Wash the car" ]' failed with status 2
acceptance_1 | # % Total % Received % Xferd Average Speed Time Time Time Current
acceptance_1 | # Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
acceptance_1 | # % Total % Received % Xferd Average Speed Time Time Time Current
acceptance_1 | # Dload Upload Total Spent Left Speed
100 84 100 84 0 0 2470 0 --:--:-- --:--:-- --:--:-- 2470
acceptance_1 | # /tmp/bats.1.src: line 26: [: too many arguments
Other tests run OK.
Can someone help to understand what is the bug in the script?
I am using Mac OSx
Thanks in advance
The text was updated successfully, but these errors were encountered:
I am just started to learn the Docker technology. Using book "Docker on Amazon Web Services" by Justin Menga.
There is an example using the acceptance.bats file with the script
setup() {$(curl $ {BASH_REMATCH[1]} | jq '.title') = $(echo "$item" | jq '.title') ] <------- this gives the error
url=${APP_URL:-localhost:8000}
item='{"title": "Wash the car", "order": 1}'
location='Location: ([^[:space:]]*)'
curl -X DELETE $url/todos
}
...
@test "create todo item" {
run curl -i -X POST -H "Content-Type: application/json" $url/todos -d "$item"
[ $status = 0 ]
[[ $output =~ "201 Created" ]] || false
[[ $output =~ $location ]] || false
[
}
While run I get error message$(curl $ {BASH_REMATCH[1]} | jq '.title') = $"Wash the car" ]' failed with status 2
acceptance_1 | # (in test file acceptance.bats, line 26)
acceptance_1 | # `[
acceptance_1 | # % Total % Received % Xferd Average Speed Time Time Time Current
acceptance_1 | # Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
acceptance_1 | # % Total % Received % Xferd Average Speed Time Time Time Current
acceptance_1 | # Dload Upload Total Spent Left Speed
100 84 100 84 0 0 2470 0 --:--:-- --:--:-- --:--:-- 2470
acceptance_1 | # /tmp/bats.1.src: line 26: [: too many arguments
Other tests run OK.
Can someone help to understand what is the bug in the script?
I am using Mac OSx
Thanks in advance
The text was updated successfully, but these errors were encountered: