Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e test for VLAN secondary network #5745

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

jianjuns
Copy link
Contributor

@jianjuns jianjuns commented Nov 25, 2023

Extend secondary network e2e tests to support testing secondary VLAN
networks. Add a script to run the test on a Kind cluster, and enable
the test on Github CI.

Issue: #5278

@jianjuns jianjuns added area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. area/secondary-network Issues or PRs related to support for secondary networks in Antrea labels Nov 25, 2023
"os"
"testing"
)

// setupLogging creates a temporary directory to export the test logs if necessary. If a directory
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved these funcs to entry.go, so they can be used in e2e-secondary-network.

@jianjuns jianjuns force-pushed the secnet-e2e branch 2 times, most recently from a5a5414 to 6a9d5f1 Compare November 27, 2023 16:41
@jianjuns jianjuns marked this pull request as ready for review November 27, 2023 16:42
@jianjuns jianjuns force-pushed the secnet-e2e branch 3 times, most recently from 034ade1 to 40f1111 Compare December 1, 2023 21:28
build/charts/antrea/conf/antrea-agent.conf Show resolved Hide resolved
ci/kind/test-secondary-network-kind.sh Outdated Show resolved Hide resolved
ci/kind/test-secondary-network-kind.sh Outdated Show resolved Hide resolved
ci/kind/test-secondary-network-kind.sh Outdated Show resolved Hide resolved
ci/kind/test-secondary-network-kind.sh Outdated Show resolved Hide resolved
test/e2e/entry.go Outdated Show resolved Hide resolved
// Create Pods on the control plane Node, assuming a single Node cluster for the SR-IOV
// test.
controlPlaneNodeName := antreae2e.NodeName(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a strong reason to specify that this is the "control-plane" Node, instead of just using nodeName := antreae2e.NodeName(0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to keep the original code behavior. But is it clearer to call out the node is the control plane node?

Copy link
Contributor

Choose a reason for hiding this comment

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

Usually you just need any Node, and the control-plane Node does not have any special meaning. In that case it's better to use nodeName(0), or even not specify the Node unless you are specifically testing for inter-Node traffic.

test/e2e-secondary-network/secondary_network_test.go Outdated Show resolved Hide resolved
test/e2e-secondary-network/secondary_network_test.go Outdated Show resolved Hide resolved
@jianjuns jianjuns force-pushed the secnet-e2e branch 3 times, most recently from 588cad9 to 6f15775 Compare February 14, 2024 04:55
test/e2e/framework.go Outdated Show resolved Hide resolved
test/e2e/framework.go Outdated Show resolved Hide resolved
test/e2e-secondary-network/secondary_network_test.go Outdated Show resolved Hide resolved
@jianjuns jianjuns force-pushed the secnet-e2e branch 4 times, most recently from b8e8ff4 to 9994612 Compare February 15, 2024 03:02
Extend secondary network e2e tests to support testing secondary VLAN
networks. Add a script to run the test on a Kind cluster, and enable
the test on Github CI.

Signed-off-by: Jianjun Shen <shenj@vmware.com>
Comment on lines +161 to +167
--secondary-bridge)
SECONDARY_BRIDGE="$2"
shift 2
;;
--physical-interface)
PHYSICAL_INTERFACE="$2"
shift 2
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that you switched to using Helm directly in the end. Should these new flags be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like to keep them as it is still simpler to run generate-manifest.sh in some cases.

@jianjuns
Copy link
Contributor Author

/test-all

@jianjuns
Copy link
Contributor Author

/test-e2e

@jianjuns jianjuns merged commit 1fa4883 into antrea-io:main Feb 15, 2024
52 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/secondary-network Issues or PRs related to support for secondary networks in Antrea area/test/e2e Issues or PRs related to Antrea specific end-to-end testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants