From 802d1935dc0da56f446f211a40c00aa3c45a9f3a Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 29 Apr 2024 16:02:33 +0200 Subject: [PATCH] e2e: simplify the test for DirectToGameServer PodPolicy Can't find a good way to send UDP traffic directly to a pod. This is not something that k8s does out of the box and requires a product like Calico or similar that uses BGP to provide direct access to pods. Removing the udp call and making the test much simpler --- test/e2e/gameserver_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/e2e/gameserver_test.go b/test/e2e/gameserver_test.go index 7862229d92..3e69706dea 100644 --- a/test/e2e/gameserver_test.go +++ b/test/e2e/gameserver_test.go @@ -862,17 +862,12 @@ func TestGameServerDirectToGameServerPort(t *testing.T) { assert.FailNow(t, "Could not get a GameServer ready", err.Error()) } + // To test sending UDP traffic directly to a pod, a product like Calico which uses BGP is needed + // so this only tests that the port is set correctly. port := readyGs.Spec.Ports[0] assert.Equal(t, agonesv1.DirectToGameServer, port.PortPolicy) assert.Empty(t, port.HostPort) assert.EqualValues(t, 7777, port.ContainerPort) - - reply, err := framework.SendGameServerUDP(t, readyGs, "Hello World !") - if err != nil { - t.Fatalf("Could ping GameServer: %v", err) - } - - assert.Equal(t, "ACK: Hello World !\n", reply) } func TestGameServerTcpProtocol(t *testing.T) {