Skip to content

Commit

Permalink
Add the makefile target to run bats
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchiu committed Jul 20, 2018
1 parent d0e4a94 commit 85bad49
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ notifications:

before_install:
- go get -u github.com/kardianos/govendor
- sudo apt-get install -y git build-essential openvswitch-switch socat
- sudo apt-get install -y git build-essential openvswitch-switch socat jq httpie
- sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- docker run -d -v /run/openvswitch/db.sock:/var/run/openvswitch/db.sock -p 50051:50051 sdnvortex/network-controller:v0.3.0 /go/bin/server -tcp=0.0.0.0:50051

install:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ src.test-coverage-vagrant:

## check build env #############################

.PHONY: src.test-bats
src.test-bats:
cd tests; \
bats .;

.PHONY: check-govendor
check-govendor:
$(info check govendor)
Expand Down
5 changes: 5 additions & 0 deletions tests/env.bats
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bats

@test "Check the httpie" {
run which http
[ $status = 0 ]
}

@test "Check the jq" {
run which jq
[ $status = 0 ]
Expand Down

0 comments on commit 85bad49

Please sign in to comment.