File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change 13
13
- uses : actions/setup-go@v4
14
14
with :
15
15
go-version-file : go.mod
16
- - run : docker run -d --network host quay.io/coreos/etcd:v3.5.10
17
16
- run : make setup
18
17
- run : make check-generate
19
18
- run : make test
Original file line number Diff line number Diff line change 1
1
# Makefile for etcdutil
2
2
3
- # # Dependency versions
4
- ETCD_VER =v3.5.10
5
-
3
+ ETCD_VER =$(shell go list -m -f '{{.Version}}' go.etcd.io/etcd/client/v3)
6
4
SUDO =sudo
7
5
8
6
.PHONY : all
9
7
all :
8
+ echo $(ETCD_VER )
10
9
@echo " Specify one of these targets:"
11
10
@echo
12
11
@echo " test - run single host tests."
13
12
@echo " setup - install dependencies."
14
13
15
14
.PHONY : test
16
15
test :
17
- test -z " $( gofmt -s -d . | tee /dev/stderr) "
18
16
staticcheck .
19
17
go build ./...
20
18
go test -race -v ./...
Original file line number Diff line number Diff line change @@ -13,12 +13,6 @@ const (
13
13
)
14
14
15
15
func testMain (m * testing.M ) int {
16
- ci := os .Getenv ("CI" ) == "true"
17
- if ci {
18
- code := m .Run ()
19
- os .Exit (code )
20
- }
21
-
22
16
etcdPath , err := os .MkdirTemp ("" , "etcdutil-test" )
23
17
if err != nil {
24
18
log .Fatal (err )
@@ -53,16 +47,8 @@ func TestMain(m *testing.M) {
53
47
func testEtcdClient (t * testing.T ) {
54
48
t .Parallel ()
55
49
56
- var clientURL string
57
- ci := os .Getenv ("CI" ) == "true"
58
- if ci {
59
- clientURL = "http://localhost:2379"
60
- } else {
61
- clientURL = etcdClientURL
62
- }
63
-
64
50
cfg := NewConfig (t .Name () + "/" )
65
- cfg .Endpoints = []string {clientURL }
51
+ cfg .Endpoints = []string {etcdClientURL }
66
52
_ , err := NewClient (cfg )
67
53
if err != nil {
68
54
t .Fatal (err )
You can’t perform that action at this time.
0 commit comments