Skip to content

Commit be2e57a

Browse files
authored
chore(ha): integration tests (#2037)
* chore(ha): integration tests * f * f * f * f * f * f * f * f * f * f
1 parent f98c8d7 commit be2e57a

File tree

31 files changed

+990
-204
lines changed

31 files changed

+990
-204
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Lint
4242
uses: golangci/golangci-lint-action@v6
4343
with:
44-
args: --build-tags exclude_graphdriver_btrfs
44+
args: --build-tags containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper,exclude_graphdriver_overlay
4545

4646
test:
4747
name: Unit tests
@@ -73,14 +73,16 @@ jobs:
7373
steps:
7474
- name: Checkout
7575
uses: actions/checkout@v4
76+
with:
77+
fetch-depth: 0
7678
- name: Setup go
7779
uses: actions/setup-go@v5
7880
with:
7981
go-version-file: go.mod
8082
cache-dependency-path: "**/*.sum"
8183
- name: Install kind
8284
run: |
83-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
85+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64
8486
chmod +x ./kind
8587
sudo mv ./kind /usr/local/bin/kind
8688
- name: Run tests

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,20 +275,20 @@ envtest:
275275
.PHONY: unit-tests
276276
unit-tests: envtest
277277
KUBEBUILDER_ASSETS="$(shell ./operator/bin/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(shell pwd)/operator/bin -p path)" \
278-
go test -tags exclude_graphdriver_btrfs -v ./pkg/... ./cmd/...
278+
go test -tags $(GO_BUILD_TAGS) -v ./pkg/... ./cmd/...
279279
$(MAKE) -C operator test
280280

281281
.PHONY: vet
282282
vet:
283-
go vet -tags exclude_graphdriver_btrfs ./...
283+
go vet -tags $(GO_BUILD_TAGS) ./...
284284

285285
.PHONY: e2e-tests
286286
e2e-tests: embedded-release
287-
go test -tags exclude_graphdriver_btrfs -timeout 60m -ldflags="$(LD_FLAGS)" -parallel 1 -failfast -v ./e2e
287+
go test -tags $(GO_BUILD_TAGS) -timeout 60m -ldflags="$(LD_FLAGS)" -parallel 1 -failfast -v ./e2e
288288

289289
.PHONY: e2e-test
290290
e2e-test:
291-
go test -tags exclude_graphdriver_btrfs -timeout 60m -ldflags="$(LD_FLAGS)" -v ./e2e -run ^$(TEST_NAME)$$
291+
go test -tags $(GO_BUILD_TAGS) -timeout 60m -ldflags="$(LD_FLAGS)" -v ./e2e -run ^$(TEST_NAME)$$
292292

293293
.PHONY: dryrun-tests
294294
dryrun-tests: export DRYRUN_MATCH = Test
@@ -312,11 +312,11 @@ clean:
312312

313313
.PHONY: lint
314314
lint:
315-
golangci-lint run -c .golangci.yml ./... --build-tags exclude_graphdriver_btrfs
315+
golangci-lint run -c .golangci.yml ./... --build-tags $(GO_BUILD_TAGS)
316316

317317
.PHONY: lint-and-fix
318318
lint-and-fix:
319-
golangci-lint run --fix -c .golangci.yml ./... --build-tags exclude_graphdriver_btrfs
319+
golangci-lint run --fix -c .golangci.yml ./... --build-tags $(GO_BUILD_TAGS)
320320

321321
.PHONY: scan
322322
scan:
@@ -329,7 +329,7 @@ scan:
329329

330330
.PHONY: buildtools
331331
buildtools:
332-
go build -tags exclude_graphdriver_btrfs -o ./output/bin/buildtools ./cmd/buildtools
332+
go build -tags $(GO_BUILD_TAGS) -o ./output/bin/buildtools ./cmd/buildtools
333333

334334
.PHONY: list-distros
335335
list-distros:

cmd/installer/cli/enable_ha.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,6 @@ func runEnableHA(ctx context.Context) error {
9090

9191
loading := spinner.Start()
9292
defer loading.Close()
93-
return addons.EnableHA(ctx, kcli, kclient, hcli, in.Spec.AirGap, in.Spec.Network.ServiceCIDR, in.Spec.Proxy, in.Spec.Config, loading.Infof)
93+
94+
return addons.EnableHA(ctx, kcli, kclient, hcli, in.Spec.AirGap, in.Spec.Network.ServiceCIDR, in.Spec.Proxy, in.Spec.Config, loading)
9495
}

cmd/installer/cli/join.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,6 @@ func maybeEnableHA(ctx context.Context, kcli client.Client, flags JoinCmdFlags,
551551
serviceCIDR,
552552
jcmd.InstallationSpec.Proxy,
553553
jcmd.InstallationSpec.Config,
554-
loading.Infof,
554+
loading,
555555
)
556556
}

common.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ else
2525
GOBIN=$(shell go env GOBIN)
2626
endif
2727

28+
GO_BUILD_TAGS ?= containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper,exclude_graphdriver_overlay
29+
2830
ifdef GH_TOKEN
2931
GH_AUTH_HEADER ?= "Authorization: token $(GH_TOKEN)"
3032
endif

go.mod

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ replace (
6464

6565
require (
6666
cel.dev/expr v0.18.0 // indirect
67-
cloud.google.com/go v0.115.1 // indirect
68-
cloud.google.com/go/auth v0.9.3 // indirect
69-
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
70-
cloud.google.com/go/compute/metadata v0.5.2 // indirect
71-
cloud.google.com/go/iam v1.2.1 // indirect
72-
cloud.google.com/go/monitoring v1.21.0 // indirect
67+
cloud.google.com/go v0.116.0 // indirect
68+
cloud.google.com/go/auth v0.13.0 // indirect
69+
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
70+
cloud.google.com/go/compute/metadata v0.6.0 // indirect
71+
cloud.google.com/go/iam v1.2.2 // indirect
72+
cloud.google.com/go/monitoring v1.21.2 // indirect
7373
cloud.google.com/go/storage v1.45.0 // indirect
7474
dario.cat/mergo v1.0.1 // indirect
7575
filippo.io/edwards25519 v1.1.0 // indirect
@@ -85,6 +85,8 @@ require (
8585
github.com/Masterminds/squirrel v1.5.4 // indirect
8686
github.com/Microsoft/go-winio v0.6.2 // indirect
8787
github.com/Microsoft/hcsshim v0.12.9 // indirect
88+
github.com/VividCortex/ewma v1.2.0 // indirect
89+
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
8890
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 // indirect
8991
github.com/andybalholm/brotli v1.0.4 // indirect
9092
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
@@ -123,6 +125,7 @@ require (
123125
github.com/containers/ocicrypt v1.2.1 // indirect
124126
github.com/containers/storage v1.57.2 // indirect
125127
github.com/coreos/go-semver v0.3.1 // indirect
128+
github.com/cyberphone/json-canonicalization v0.0.0-20231217050601-ba74d44ecf5f // indirect
126129
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
127130
github.com/distribution/distribution/v3 v3.0.0-rc.3 // indirect
128131
github.com/docker/cli v27.5.1+incompatible // indirect
@@ -145,6 +148,13 @@ require (
145148
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
146149
github.com/go-logr/stdr v1.2.2 // indirect
147150
github.com/go-ole/go-ole v1.3.0 // indirect
151+
github.com/go-openapi/analysis v0.23.0 // indirect
152+
github.com/go-openapi/errors v0.22.0 // indirect
153+
github.com/go-openapi/loads v0.22.0 // indirect
154+
github.com/go-openapi/runtime v0.28.0 // indirect
155+
github.com/go-openapi/spec v0.21.0 // indirect
156+
github.com/go-openapi/strfmt v0.23.0 // indirect
157+
github.com/go-openapi/validate v0.24.0 // indirect
148158
github.com/go-redis/redis/v7 v7.4.1 // indirect
149159
github.com/go-sql-driver/mysql v1.8.1 // indirect
150160
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
@@ -163,7 +173,7 @@ require (
163173
github.com/google/s2a-go v0.1.8 // indirect
164174
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
165175
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
166-
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
176+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
167177
github.com/gorilla/handlers v1.5.2 // indirect
168178
github.com/gorilla/mux v1.8.1 // indirect
169179
github.com/gosuri/uitable v0.0.4 // indirect
@@ -180,22 +190,25 @@ require (
180190
github.com/jackc/pgpassfile v1.0.0 // indirect
181191
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
182192
github.com/jackc/pgx/v5 v5.7.2 // indirect
183-
github.com/jmespath/go-jmespath v0.4.0 // indirect
193+
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
184194
github.com/jmoiron/sqlx v1.4.0 // indirect
185195
github.com/k0sproject/version v0.6.0 // indirect
186196
github.com/klauspost/compress v1.17.11 // indirect
187197
github.com/klauspost/pgzip v1.2.6 // indirect
188198
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
189199
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
200+
github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec // indirect
190201
github.com/lib/pq v1.10.9 // indirect
191202
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
192203
github.com/longhorn/go-iscsi-helper v0.0.0-20210330030558-49a327fb024e // indirect
193204
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
194205
github.com/magiconair/properties v1.8.7 // indirect
195206
github.com/manifoldco/promptui v0.9.0 // indirect
207+
github.com/mattn/go-sqlite3 v1.14.24 // indirect
196208
github.com/mholt/archiver/v3 v3.5.1 // indirect
197209
github.com/microsoft/go-mssqldb v1.8.0 // indirect
198210
github.com/miekg/dns v1.1.63 // indirect
211+
github.com/miekg/pkcs11 v1.1.1 // indirect
199212
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
200213
github.com/mitchellh/go-homedir v1.1.0 // indirect
201214
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
@@ -210,6 +223,7 @@ require (
210223
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
211224
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
212225
github.com/nwaples/rardecode v1.1.2 // indirect
226+
github.com/oklog/ulid v1.3.1 // indirect
213227
github.com/onsi/ginkgo v1.16.5 // indirect
214228
github.com/opencontainers/go-digest v1.0.0 // indirect
215229
github.com/opencontainers/image-spec v1.1.0 // indirect
@@ -221,29 +235,37 @@ require (
221235
github.com/pierrec/lz4/v4 v4.1.18 // indirect
222236
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
223237
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
238+
github.com/proglottis/gpgme v0.1.4 // indirect
224239
github.com/prometheus/client_golang v1.20.5 // indirect
225240
github.com/prometheus/client_model v0.6.1 // indirect
226241
github.com/prometheus/common v0.60.1 // indirect
227242
github.com/prometheus/procfs v0.15.1 // indirect
228-
github.com/redis/go-redis/v9 v9.5.2 // indirect
229243
github.com/rubenv/sql-migrate v1.7.1 // indirect
230244
github.com/sagikazarmark/locafero v0.6.0 // indirect
231245
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
246+
github.com/secure-systems-lab/go-securesystemslib v0.9.0 // indirect
232247
github.com/segmentio/ksuid v1.0.4 // indirect
233248
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
234249
github.com/shirou/gopsutil/v4 v4.25.1 // indirect
235250
github.com/shopspring/decimal v1.4.0 // indirect
251+
github.com/sigstore/fulcio v1.6.4 // indirect
252+
github.com/sigstore/rekor v1.3.8 // indirect
253+
github.com/sigstore/sigstore v1.8.12 // indirect
254+
github.com/smallstep/pkcs7 v0.1.1 // indirect
236255
github.com/sourcegraph/conc v0.3.0 // indirect
237256
github.com/spf13/afero v1.11.0 // indirect
238257
github.com/spf13/cast v1.7.0 // indirect
258+
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
239259
github.com/stretchr/objx v0.5.2 // indirect
240260
github.com/subosito/gotenv v1.6.0 // indirect
241261
github.com/sylabs/sif/v2 v2.20.2 // indirect
242262
github.com/tchap/go-patricia/v2 v2.3.2 // indirect
263+
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
243264
github.com/tklauser/go-sysconf v0.3.12 // indirect
244265
github.com/tklauser/numcpus v0.6.1 // indirect
245266
github.com/ulikunitz/xz v0.5.12 // indirect
246267
github.com/vbatts/tar-split v0.11.7 // indirect
268+
github.com/vbauerster/mpb/v8 v8.9.1 // indirect
247269
github.com/vishvananda/netlink v1.3.0 // indirect
248270
github.com/vishvananda/netns v0.0.5 // indirect
249271
github.com/x448/float16 v0.8.4 // indirect
@@ -259,6 +281,7 @@ require (
259281
go.etcd.io/etcd/api/v3 v3.5.17 // indirect
260282
go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect
261283
go.etcd.io/etcd/client/v3 v3.5.17 // indirect
284+
go.mongodb.org/mongo-driver v1.14.0 // indirect
262285
go.opencensus.io v0.24.0 // indirect
263286
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
264287
go.opentelemetry.io/contrib/detectors/gcp v1.31.0 // indirect
@@ -274,9 +297,9 @@ require (
274297
golang.org/x/sync v0.12.0 // indirect
275298
golang.org/x/tools v0.30.0 // indirect
276299
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
277-
google.golang.org/api v0.197.0 // indirect
278-
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
279-
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect
300+
google.golang.org/api v0.216.0 // indirect
301+
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
302+
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
280303
google.golang.org/genproto/googleapis/rpc v0.0.0-20250102185135-69823020774d // indirect
281304
google.golang.org/grpc v1.69.4 // indirect
282305
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
@@ -340,7 +363,7 @@ require (
340363
golang.org/x/oauth2 v0.25.0 // indirect
341364
golang.org/x/sys v0.31.0 // indirect
342365
golang.org/x/text v0.23.0 // indirect
343-
golang.org/x/time v0.7.0 // indirect
366+
golang.org/x/time v0.9.0 // indirect
344367
google.golang.org/protobuf v1.36.5 // indirect
345368
gopkg.in/inf.v0 v0.9.1 // indirect
346369
k8s.io/apiextensions-apiserver v0.32.3

0 commit comments

Comments
 (0)