Skip to content

Commit

Permalink
Split binaries tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lmakarov committed Jul 16, 2018
1 parent b18f4c4 commit 2d54c67
Showing 1 changed file with 51 additions and 10 deletions.
61 changes: 51 additions & 10 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ _healthcheck_wait ()
make clean
}

@test "Check binaries and versions" {
@test "Check PHP tools and versions" {
[[ $SKIP == 1 ]] && skip

### Setup ###
Expand Down Expand Up @@ -191,26 +191,67 @@ _healthcheck_wait ()
[[ ${status} == 0 ]]
unset output

# Check Blackfire CLI version
run docker exec -u docker "$NAME" bash -lc 'blackfire version | grep "^blackfire ${BLACKFIRE_VERSION} "'
# Check Terminus version
run docker exec -u docker "$NAME" bash -lc 'terminus --version | grep "^Terminus ${TERMINUS_VERSION}$"'
[[ ${status} == 0 ]]
unset output

# Check mhsendmail (does not have a flag to report its versions...)
run docker exec -u docker "$NAME" which mhsendmail
echo "$output" | grep "/usr/local/bin/mhsendmail"
# Check Platform CLI version
run docker exec -u docker "$NAME" bash -lc 'platform --version | grep "Platform.sh CLI ${PLATFORMSH_CLI_VERSION}"'
[[ ${status} == 0 ]]
unset output

# Check Terminus version
run docker exec -u docker "$NAME" bash -lc 'terminus --version | grep "^Terminus ${TERMINUS_VERSION}$"'
### Cleanup ###
make clean
}

@test "Check NodeJS tools and versions" {
#[[ $SKIP == 1 ]] && skip

### Setup ###
make start
_healthcheck_wait

### Tests ###

# nvm
run docker exec -u docker "$NAME" bash -lc 'nvm --version | grep "${NVM_VERSION}"'
[[ ${status} == 0 ]]
unset output

# Check Platform CLI version
run docker exec -u docker "$NAME" bash -lc 'platform --version | grep "Platform.sh CLI ${PLATFORMSH_CLI_VERSION}"'
# nodejs
run docker exec -u docker "$NAME" bash -lc 'node --version | grep "${NODE_VERSION}"'
[[ ${status} == 0 ]]
unset output

# yarn
run docker exec -u docker "$NAME" bash -lc 'yarn --version | grep "${YARN_VERSION}"'
[[ ${status} == 0 ]]
unset output

### Cleanup ###
make clean
}

@test "Check misc tools and versions" {
[[ $SKIP == 1 ]] && skip

### Setup ###
make start
_healthcheck_wait

### Tests ###

# Check Blackfire CLI version
run docker exec -u docker "$NAME" bash -lc 'blackfire version | grep "^blackfire ${BLACKFIRE_VERSION} "'
[[ ${status} == 0 ]]
unset output

# Check mhsendmail (does not have a flag to report its versions...)
run docker exec -u docker "$NAME" which mhsendmail
echo "$output" | grep "/usr/local/bin/mhsendmail"
unset output

### Cleanup ###
make clean
}
Expand Down

0 comments on commit 2d54c67

Please sign in to comment.