Skip to content

tproxy: E2E tests#20296

Merged
tgross merged 3 commits intof-tproxyfrom
f-tproxy-e2e
Apr 5, 2024
Merged

tproxy: E2E tests#20296
tgross merged 3 commits intof-tproxyfrom
f-tproxy-e2e

Conversation

@tgross
Copy link
Copy Markdown
Member

@tgross tgross commented Apr 4, 2024

Add the consul-cni plugin to the Linux AMI for E2E, and add a test case that covers the transparent proxy feature.

Ref: #20175


$ go test -v -count=1 ./e2e/connect
=== RUN   TestConnect_LegacyACLs
=== RUN   TestConnect_LegacyACLs/ConnectDemo
=== RUN   TestConnect_LegacyACLs/ConnectDemoNamespaced
=== RUN   TestConnect_LegacyACLs/ConnectNativeDemo
=== RUN   TestConnect_LegacyACLs/ConnectIngressGatewayDemo
=== RUN   TestConnect_LegacyACLs/ConnectTerminatingGateway
--- PASS: TestConnect_LegacyACLs (111.16s)
    --- PASS: TestConnect_LegacyACLs/ConnectDemo (36.82s)
    --- PASS: TestConnect_LegacyACLs/ConnectDemoNamespaced (30.67s)
    --- PASS: TestConnect_LegacyACLs/ConnectNativeDemo (15.45s)
    --- PASS: TestConnect_LegacyACLs/ConnectIngressGatewayDemo (14.45s)
    --- PASS: TestConnect_LegacyACLs/ConnectTerminatingGateway (13.49s)
=== RUN   Test_serviceOfSIToken
--- PASS: Test_serviceOfSIToken (0.00s)
=== RUN   TestConnect_ClientRestart
    client_test.go:17: skipping test that does nomad agent restart
--- SKIP: TestConnect_ClientRestart (0.00s)
=== RUN   TestConnect
=== RUN   TestConnect/ConnectDemo
=== RUN   TestConnect/ConnectCustomSidecarExposed
=== RUN   TestConnect/ConnectNativeDemo
=== RUN   TestConnect/ConnectIngressGatewayDemo
=== RUN   TestConnect/ConnectMultiIngress
=== RUN   TestConnect/ConnectTerminatingGateway
=== RUN   TestConnect/ConnectMultiService
=== RUN   TestConnect/ConnectTransparentProxy
--- PASS: TestConnect (143.11s)
    --- PASS: TestConnect/ConnectDemo (21.42s)
    --- PASS: TestConnect/ConnectCustomSidecarExposed (22.34s)
    --- PASS: TestConnect/ConnectNativeDemo (15.30s)
    --- PASS: TestConnect/ConnectIngressGatewayDemo (15.29s)
    --- PASS: TestConnect/ConnectMultiIngress (15.33s)
    --- PASS: TestConnect/ConnectTerminatingGateway (13.36s)
    --- PASS: TestConnect/ConnectMultiService (16.33s)
    --- PASS: TestConnect/ConnectTransparentProxy (23.45s)
PASS
ok      github.com/hashicorp/nomad/e2e/connect  254.287s

Copy link
Copy Markdown
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's all coming together! few little nitpicks, and one question about the test assertions.

Comment on lines 73 to 74
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really didn't already have Go installed on these boxes? I'd put this under its own little heading, even if it's only currently used for "consul-k8s".

unless you're piling these things together to be also removed in bulk after 1.4.2 is shipped?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't generally need toolchains on these machines. And yeah, I was putting them all together so they're easy to find and remove once 1.4.2 ships.

Copy link
Copy Markdown
Contributor

@shoenig shoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tgross added 2 commits April 5, 2024 13:13
Add the `consul-cni` plugin to the Linux AMI for E2E, and add a test case that
covers the transparent proxy feature.

Ref: #20175
@tgross
Copy link
Copy Markdown
Member Author

tgross commented Apr 5, 2024

After addressing code review comments:

$ go test -v -count=1 ./connect
=== RUN   TestConnect_LegacyACLs
=== RUN   TestConnect_LegacyACLs/ConnectDemo
=== RUN   TestConnect_LegacyACLs/ConnectDemoNamespaced
=== RUN   TestConnect_LegacyACLs/ConnectNativeDemo
=== RUN   TestConnect_LegacyACLs/ConnectIngressGatewayDemo
=== RUN   TestConnect_LegacyACLs/ConnectTerminatingGateway
--- PASS: TestConnect_LegacyACLs (93.03s)
    --- PASS: TestConnect_LegacyACLs/ConnectDemo (24.84s)
    --- PASS: TestConnect_LegacyACLs/ConnectDemoNamespaced (25.66s)
    --- PASS: TestConnect_LegacyACLs/ConnectNativeDemo (14.41s)
    --- PASS: TestConnect_LegacyACLs/ConnectIngressGatewayDemo (13.39s)
    --- PASS: TestConnect_LegacyACLs/ConnectTerminatingGateway (14.48s)
=== RUN   Test_serviceOfSIToken
--- PASS: Test_serviceOfSIToken (0.00s)
=== RUN   TestConnect_ClientRestart
    client_test.go:17: skipping test that does nomad agent restart
--- SKIP: TestConnect_ClientRestart (0.00s)
=== RUN   TestConnect
=== RUN   TestConnect/ConnectDemo
=== RUN   TestConnect/ConnectCustomSidecarExposed
=== RUN   TestConnect/ConnectNativeDemo
=== RUN   TestConnect/ConnectIngressGatewayDemo
=== RUN   TestConnect/ConnectMultiIngress
=== RUN   TestConnect/ConnectTerminatingGateway
=== RUN   TestConnect/ConnectMultiService
=== RUN   TestConnect/ConnectTransparentProxy
--- PASS: TestConnect (145.09s)
    --- PASS: TestConnect/ConnectDemo (24.78s)
    --- PASS: TestConnect/ConnectCustomSidecarExposed (16.35s)
    --- PASS: TestConnect/ConnectNativeDemo (14.32s)
    --- PASS: TestConnect/ConnectIngressGatewayDemo (13.29s)
    --- PASS: TestConnect/ConnectMultiIngress (14.36s)
    --- PASS: TestConnect/ConnectTerminatingGateway (14.41s)
    --- PASS: TestConnect/ConnectMultiService (15.43s)
    --- PASS: TestConnect/ConnectTransparentProxy (31.90s)
PASS
ok      github.com/hashicorp/nomad/e2e/connect  238.124s

@tgross tgross merged commit 548adb0 into f-tproxy Apr 5, 2024
@tgross tgross deleted the f-tproxy-e2e branch April 5, 2024 18:23
tgross added a commit that referenced this pull request Apr 12, 2024
In #20296 we added a Go tool chain to the AMI we use for E2E tests, so that we
can build `consul-cni` for tproxy testing. This is intended to be temporary
until `consul-k8s` 1.4.2 is officially released. But the Go cache from building
`consul-k8s` uses up roughly 1.5GiB of space and the test machines have fairly
small disks. This causes the Nomad clients to aggressively GC client allocations
that stop, which breaks tests that run batch workloads and then read their logs.
tgross added a commit that referenced this pull request Apr 12, 2024
In #20296 we added a Go tool chain to the AMI we use for E2E tests, so that we
can build `consul-cni` for tproxy testing. This is intended to be temporary
until `consul-k8s` 1.4.2 is officially released. But the Go cache from building
`consul-k8s` uses up roughly 1.5GiB of space and the test machines have fairly
small disks. This causes the Nomad clients to aggressively GC client allocations
that stop, which breaks tests that run batch workloads and then read their logs.
philrenaud pushed a commit that referenced this pull request Apr 18, 2024
Add the `consul-cni` plugin to the Linux AMI for E2E, and add a test case that
covers the transparent proxy feature. Add test assertions to the Connect tests
for upstream reachability

Ref: #20175
philrenaud pushed a commit that referenced this pull request Apr 18, 2024
In #20296 we added a Go tool chain to the AMI we use for E2E tests, so that we
can build `consul-cni` for tproxy testing. This is intended to be temporary
until `consul-k8s` 1.4.2 is officially released. But the Go cache from building
`consul-k8s` uses up roughly 1.5GiB of space and the test machines have fairly
small disks. This causes the Nomad clients to aggressively GC client allocations
that stop, which breaks tests that run batch workloads and then read their logs.
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

theme/consul/connect Consul Connect integration theme/e2e theme/testing Test related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants