Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2572 from dongluochen/fix-version-validation
Browse files Browse the repository at this point in the history
Fix api_version test
  • Loading branch information
dongluochen committed Dec 21, 2016
2 parents fecbcff + d7b9ff5 commit 87c150b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/integration/api_version.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ function teardown() {
out=$(docker -H "${HOSTS[0]}" version)

# Check client version
run bash -c "echo '$out' | grep -i version | grep -v Go | grep -v API | grep -v Minimum"
run bash -c "echo '$out' | egrep -i '^\s*Version'"
[ "$status" -eq 0 ]

[[ $(echo "${lines[0]}" | cut -d':' -f2 | tr -d '[:space:]') == $(echo "${lines[1]}" | cut -d':' -f2 | tr -d '[:space:]') ]]
[[ $(echo "${lines[0]}" | cut -d':' -f2 | awk -F' ' '{print $1}') == $(echo "${lines[1]}" | cut -d':' -f2 | awk -F' ' '{print $1}') ]]

# Check API version
run bash -c "echo '$out' | grep -i version | grep -v Minimum | grep API"
run bash -c "echo '$out' | egrep -i '^\s*API version:'"
[ "$status" -eq 0 ]

[[ $(echo "${lines[0]}" | cut -d':' -f2 | tr -d '[:space:]') == $(echo "${lines[1]}" | cut -d':' -f2 | tr -d '[:space:]') ]]
[[ $(echo "${lines[0]}" | cut -d':' -f2 | awk -F' ' '{print $1}') == $(echo "${lines[1]}" | cut -d':' -f2 | awk -F' ' '{print $1}') ]]

}

0 comments on commit 87c150b

Please sign in to comment.