Skip to content

Commit

Permalink
[TASK] Add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ochorocho committed Jul 7, 2024
1 parent a58e320 commit 36bbffa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
@test "See docker version" {
run docker-run "docker version -f json"

echo $output

version=$(echo "$output" | yq .Client.Version)
regex='^([0-9]+)\.([0-9]+)\.([0-9]+)$'

echo $version

[[ $version =~ $regex ]]
[ "$status" -eq 0 ]
}
Expand All @@ -22,6 +18,10 @@
version=$(echo "$output" | head -2 | tail -1 | yq '.raw.["DDEV version"]')
regex='^v([0-9]+)\.([0-9]+)\.([0-9]+)$'


echo "############################################################################"
echo $(echo "$output" | head -2 | tail -1)
echo "############################################################################"
echo $version

[[ $version =~ $regex ]]
Expand Down

0 comments on commit 36bbffa

Please sign in to comment.