File tree Expand file tree Collapse file tree 12 files changed +171
-10
lines changed Expand file tree Collapse file tree 12 files changed +171
-10
lines changed Original file line number Diff line number Diff line change 6262 int-tests :
6363 name : Integration tests
6464 runs-on : ubuntu-latest
65+ needs :
66+ - int-tests-kind
67+ - int-tests-manager
68+ steps :
69+ - name : Succeed if all tests passed
70+ run : echo "Integration tests succeeded"
71+
72+ int-tests-kind :
73+ name : Integration tests (kind)
74+ runs-on : ubuntu-latest
6575 steps :
6676 - name : Checkout
6777 uses : actions/checkout@v4
7787 sudo mv ./kind /usr/local/bin/kind
7888 - name : Run tests
7989 run : |
80- make -C tests/integration test
90+ make -C tests/integration test-kind
91+
92+ int-tests-manager :
93+ name : Integration tests (manager)
94+ runs-on : ubuntu-latest
95+ steps :
96+ - name : Checkout
97+ uses : actions/checkout@v4
98+ - name : Setup go
99+ uses : actions/setup-go@v5
100+ with :
101+ go-version-file : go.mod
102+ cache-dependency-path : " **/*.sum"
103+ - name : Run tests
104+ run : |
105+ make -C tests/integration test-manager
81106
82107 dryrun-tests :
83108 name : Dryrun tests
Original file line number Diff line number Diff line change @@ -24,3 +24,6 @@ preflightbundle*
2424
2525hack /release.tgz
2626hack /release
27+
28+ # Test binary, built with `go test -c`
29+ * .test
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ PARALLEL ?= 2
55RUN ?=
66
77.PHONY : test
8- test : test-openebs
8+ test : test-kind test-manager
99
10- .PHONY : test-openebs
11- test-openebs :
12- DEBUG= $( DEBUG ) go test -v -tags exclude_graphdriver_btrfs \
13- -timeout=5m \
14- -parallel= $( PARALLEL ) \
15- -run= ' $(value RUN) ' \
16- ./openebs/...
10+ .PHONY : test-kind
11+ test-kind :
12+ $( MAKE ) -C ./kind test
13+
14+ .PHONY : test-manager
15+ test-manager :
16+ $( MAKE ) -C ./manager clean build test
Original file line number Diff line number Diff line change 1+ SHELL := /bin/bash
2+
3+ DEBUG ?=
4+ PARALLEL ?= 2
5+ RUN ?=
6+
7+ .PHONY : test
8+ test : test-openebs
9+
10+ .PHONY : test-openebs
11+ test-openebs :
12+ DEBUG=$(DEBUG ) go test -v -tags exclude_graphdriver_btrfs \
13+ -timeout=5m \
14+ -parallel=$(PARALLEL ) \
15+ -run=' $(value RUN)' \
16+ ./openebs/...
File renamed without changes.
Original file line number Diff line number Diff line change 44 "testing"
55 "time"
66
7- "github.com/replicatedhq/embedded-cluster/tests/integration/openebs/static"
7+ "github.com/replicatedhq/embedded-cluster/tests/integration/kind/ openebs/static"
88 "github.com/replicatedhq/embedded-cluster/tests/integration/util"
99)
1010
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ SHELL := /bin/bash
2+
3+ DEBUG ?=
4+ RUN ?=
5+
6+ CONTAINER_NAME = integration-test-manager
7+
8+ .PHONY : test
9+ test : DISTRO = debian-bookworm
10+ test :
11+ @-docker rm -f $(CONTAINER_NAME ) 2> /dev/null ; true
12+ @docker run -d \
13+ --name $(CONTAINER_NAME ) \
14+ --privileged \
15+ --restart=unless-stopped \
16+ -v $(shell pwd) /manager.test:/wrk/manager.test \
17+ -v $(shell pwd) /../../../pkg/goods/bins/manager:/wrk/bin/manager \
18+ -e DATA_DIR=/wrk \
19+ replicated/ec-distro:$(DISTRO )
20+ @sleep 5 # wait for container to be ready
21+ docker exec \
22+ -e DEBUG=$(DEBUG ) \
23+ $(CONTAINER_NAME ) \
24+ /wrk/manager.test \
25+ -test.v \
26+ -test.timeout=5m \
27+ -test.run=' $(value RUN)'
28+
29+ .PHONY : clean
30+ clean :
31+ rm -f manager.test
32+ -docker rm -f $(CONTAINER_NAME ) 2> /dev/null ; true
33+
34+ .PHONY : build
35+ build : manager.test ../../../pkg/goods/bins/manager
36+
37+ manager.test :
38+ GOOS=linux go test -c .
39+
40+ ../../../pkg/goods/bins/manager :
41+ $(MAKE ) -C ../../../ pkg/goods/bins/manager
You can’t perform that action at this time.
0 commit comments