Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 41f31b7

Browse files
hargutshaneutt
authored andcommitted
Add integration test infrastructure (#419)
Signed-off-by: Harald Gutmann <harald@gutmann.one> Signed-off-by: Shane Utt <shaneutt@linux.com>
1 parent f9f3ef7 commit 41f31b7

File tree

18 files changed

+982
-14
lines changed

18 files changed

+982
-14
lines changed

Cargo.lock

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,15 @@ version = "0.4.27"
13441344
source = "registry+https://github.com/rust-lang/crates.io-index"
13451345
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
13461346

1347+
[[package]]
1348+
name = "matchers"
1349+
version = "0.1.0"
1350+
source = "registry+https://github.com/rust-lang/crates.io-index"
1351+
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
1352+
dependencies = [
1353+
"regex-automata 0.1.10",
1354+
]
1355+
13471356
[[package]]
13481357
name = "memchr"
13491358
version = "2.7.5"
@@ -1765,8 +1774,17 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
17651774
dependencies = [
17661775
"aho-corasick",
17671776
"memchr",
1768-
"regex-automata",
1769-
"regex-syntax",
1777+
"regex-automata 0.4.9",
1778+
"regex-syntax 0.8.5",
1779+
]
1780+
1781+
[[package]]
1782+
name = "regex-automata"
1783+
version = "0.1.10"
1784+
source = "registry+https://github.com/rust-lang/crates.io-index"
1785+
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
1786+
dependencies = [
1787+
"regex-syntax 0.6.29",
17701788
]
17711789

17721790
[[package]]
@@ -1777,7 +1795,7 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
17771795
dependencies = [
17781796
"aho-corasick",
17791797
"memchr",
1780-
"regex-syntax",
1798+
"regex-syntax 0.8.5",
17811799
]
17821800

17831801
[[package]]
@@ -1786,6 +1804,12 @@ version = "0.1.6"
17861804
source = "registry+https://github.com/rust-lang/crates.io-index"
17871805
checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
17881806

1807+
[[package]]
1808+
name = "regex-syntax"
1809+
version = "0.6.29"
1810+
source = "registry+https://github.com/rust-lang/crates.io-index"
1811+
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
1812+
17891813
[[package]]
17901814
name = "regex-syntax"
17911815
version = "0.8.5"
@@ -2176,6 +2200,18 @@ dependencies = [
21762200
"windows-sys 0.52.0",
21772201
]
21782202

2203+
[[package]]
2204+
name = "tests-integration"
2205+
version = "0.3.0"
2206+
dependencies = [
2207+
"k8s-openapi",
2208+
"kube",
2209+
"thiserror 2.0.12",
2210+
"tokio",
2211+
"tracing",
2212+
"tracing-subscriber",
2213+
]
2214+
21792215
[[package]]
21802216
name = "thiserror"
21812217
version = "1.0.69"
@@ -2453,8 +2489,12 @@ version = "0.3.19"
24532489
source = "registry+https://github.com/rust-lang/crates.io-index"
24542490
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
24552491
dependencies = [
2492+
"matchers",
2493+
"once_cell",
2494+
"regex",
24562495
"sharded-slab",
24572496
"thread_local",
2497+
"tracing",
24582498
"tracing-core",
24592499
]
24602500

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ members = [
55
"dataplane/api-server",
66
"dataplane/common",
77
"dataplane/loader",
8+
"tests-integration",
89
"tools/udp-test-server",
910
"xtask",
1011
]

build/Containerfile.controlplane

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ COPY controlplane/ controlplane/
1818

1919
COPY dataplane/ dataplane/
2020

21+
COPY tests-integration/ tests-integration/
22+
2123
COPY tools/ tools/
2224

2325
COPY xtask/ xtask/

build/Containerfile.dataplane

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ COPY controlplane/ controlplane/
4040

4141
COPY dataplane/ dataplane/
4242

43+
COPY tests-integration/ tests-integration/
44+
4345
COPY tools/ tools/
4446

4547
COPY xtask/ xtask/

build/Containerfile.udp_test_server

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ RUN apk add --no-cache musl-dev clang lld
88

99
WORKDIR /workspace
1010

11-
WORKDIR /workspace
12-
1311
ARG PROJECT_DIR=/workspace
1412

1513
ARG BUILD_DIR=$PROJECT_DIR/build
@@ -20,6 +18,8 @@ COPY controlplane/ controlplane/
2018

2119
COPY dataplane/ dataplane/
2220

21+
COPY tests-integration/ tests-integration/
22+
2323
COPY tools/ tools/
2424

2525
COPY xtask/ xtask/

config/dataplane/dataplane.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ spec:
2424
securityContext:
2525
privileged: true
2626
args: ["-i", "eth0"]
27+
ports:
28+
- containerPort: 9874
2729
env:
2830
- name: RUST_LOG
2931
value: debug

config/default/kustomization.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ kind: Kustomization
4444
resources:
4545
- ../rbac
4646
- ../manager
47-
- ../dataplane
48-
patches:
49-
- path: manager_auth_proxy_patch.yaml
47+
- ../dataplane

config/manager/manager.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spec:
3535
# type: RuntimeDefault
3636
containers:
3737
- command:
38-
- /workspace/manager
38+
- /controller
3939
args:
4040
- --leader-elect
4141
image: ghcr.io/kubernetes-sigs/blixt-controlplane:latest
@@ -47,14 +47,12 @@ spec:
4747
drop:
4848
- "ALL"
4949
livenessProbe:
50-
httpGet:
51-
path: /healthz
50+
grpc:
5251
port: 8081
5352
initialDelaySeconds: 15
5453
periodSeconds: 20
5554
readinessProbe:
56-
httpGet:
57-
path: /readyz
55+
grpc:
5856
port: 8081
5957
initialDelaySeconds: 5
6058
periodSeconds: 10
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: metallb.io/v1beta1
2+
kind: IPAddressPool
3+
metadata:
4+
name: blixt-system-pool
5+
spec:
6+
addresses:
7+
- 10.89.0.100-10.89.0.250
8+
autoAssign: true
9+
avoidBuggyIPs: false
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: metallb-system
4+
resources:
5+
- ipaddresspool.yaml
6+
- l2advertisement.yaml

0 commit comments

Comments
 (0)