-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 835 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (27 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export GOPATH=$(shell pwd)
export GOBIN=$(shell pwd)/bin
export HOSTNAME=$(shell hostname)
all:
mkdir -p $(GOBIN)
go get github.com/stretchr/testify/assert
go get
go install
clean:
rm -rf bin
test:
go test *.go
test.verbose:
go test *.go -v
run.testdb:
-killall mongod
sleep 4
rm -rf testdb
mkdir -p testdb/one
mkdir -p testdb/two
mkdir -p testdb/three
mongod --replSet atoll-test --logpath testdb/mongod.log --fork --dbpath testdb/one --port 26017
mongod --replSet atoll-test --logpath testdb/mongod.log --fork --dbpath testdb/two --port 26016
mongod --replSet atoll-test --logpath testdb/mongod.log --fork --dbpath testdb/three --port 26015
echo "rs.initiate()" | mongo --port 26017
echo "rs.add(\""$(HOSTNAME)":26016\")" | mongo --port 26017
echo "rs.addArb(\""$(HOSTNAME)":26015\")" | mongo --port 26017