-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (39 loc) · 1.18 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# NOTE: This is valid only while the `make local.zk.up`
ZOOKEEPER_SERVERS=localhost:2181,localhost:2182,localhost:2183
default: build
build:
go build -v ./...
install: build
go install -v ./...
# Executes golangci-lint.
# See: https://golangci-lint.run/.
lint:
golangci-lint run
# Generates the documentation that eventually gets published here:
# https://registry.terraform.io/providers/tfzk/zookeeper/latest/docs.
generate:
go generate ./...
# Formats the codebase.
fmt:
gofmt -s -w -e .
# Updates all dependencies, recursively.
deps.update:
go get -u ./...
go mod tidy
test:
go test -v -cover -timeout=2m -parallel=4 ./...
testacc:
TF_ACC=1 make test
# Stands up a ZooKeeper Ensemble, for testing.
local.zk.up:
./scripts/zk-local-ensemble/up
# Shuts down the ZooKeeper Ensemble.
local.zk.down:
./scripts/zk-local-ensemble/down
# Restarts the ZooKeeper Ensemble.
local.zk.restart:
./scripts/zk-local-ensemble/restart
# Runs Acceptance Tests against the ZooKeeper Ensemble running locally.
local.testacc:
ZOOKEEPER_SERVERS=$(ZOOKEEPER_SERVERS) make testacc
.PHONY: build install lint generate fmt deps.update test testacc local.zk.up local.zk.down local.zk.restart local.testacc