From e2431dcbe306e4a029018d533df85e61fe132cec Mon Sep 17 00:00:00 2001 From: Marco Iorio Date: Mon, 16 Oct 2023 08:46:56 +0200 Subject: [PATCH] connectivity: don't run encryption tests on single node Disable the encryption tests when running the connectivity tests on a single node cluster, as they require that source and destination are hosted on different nodes. Signed-off-by: Marco Iorio --- connectivity/suite.go | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/connectivity/suite.go b/connectivity/suite.go index f1567e1b45..9acec0c26d 100644 --- a/connectivity/suite.go +++ b/connectivity/suite.go @@ -745,19 +745,21 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch tests.OutsideToNodePort(), ) - // Encryption checks are always executed as a sanity check, asserting whether - // unencrypted packets shall, or shall not, be observed based on the feature set. - ct.NewTest("pod-to-pod-encryption"). - WithScenarios( - tests.PodToPodEncryption(features.RequireEnabled(features.EncryptionPod)), - ) - ct.NewTest("node-to-node-encryption"). - WithScenarios( - tests.NodeToNodeEncryption( - features.RequireEnabled(features.EncryptionPod), - features.RequireEnabled(features.EncryptionNode), - ), - ) + if !ct.Params().SingleNode { + // Encryption checks are always executed as a sanity check, asserting whether + // unencrypted packets shall, or shall not, be observed based on the feature set. + ct.NewTest("pod-to-pod-encryption"). + WithScenarios( + tests.PodToPodEncryption(features.RequireEnabled(features.EncryptionPod)), + ) + ct.NewTest("node-to-node-encryption"). + WithScenarios( + tests.NodeToNodeEncryption( + features.RequireEnabled(features.EncryptionPod), + features.RequireEnabled(features.EncryptionNode), + ), + ) + } if ct.Params().IncludeUnsafeTests { ct.NewTest("egress-gateway").