From 8f23c90180241fa25bf0b77e8d1afb4b3abef565 Mon Sep 17 00:00:00 2001 From: DanStough Date: Tue, 7 Nov 2023 11:17:37 -0500 Subject: [PATCH] test: fix tests for unsupported L7 TPs --- .../meshconfig_controller_test.go | 73 ++++++++++--------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/control-plane/config-entries/controllersv2/meshconfig_controller_test.go b/control-plane/config-entries/controllersv2/meshconfig_controller_test.go index e95e722ea6..c7da7b3de3 100644 --- a/control-plane/config-entries/controllersv2/meshconfig_controller_test.go +++ b/control-plane/config-entries/controllersv2/meshconfig_controller_test.go @@ -70,13 +70,14 @@ func TestMeshConfigController_createsMeshConfig(t *testing.T) { IdentityName: "source-identity", }, }, - DestinationRules: []*pbauth.DestinationRule{ - { - PathExact: "/hello", - Methods: []string{"GET", "POST"}, - PortNames: []string{"web", "admin"}, - }, - }, + // TODO: enable this when L7 traffic permissions are supported + //DestinationRules: []*pbauth.DestinationRule{ + // { + // PathExact: "/hello", + // Methods: []string{"GET", "POST"}, + // PortNames: []string{"web", "admin"}, + // }, + //}, }, }, }, @@ -101,13 +102,13 @@ func TestMeshConfigController_createsMeshConfig(t *testing.T) { Peer: constants.DefaultConsulPeer, }, }, - DestinationRules: []*pbauth.DestinationRule{ - { - PathExact: "/hello", - Methods: []string{"GET", "POST"}, - PortNames: []string{"web", "admin"}, - }, - }, + //DestinationRules: []*pbauth.DestinationRule{ + // { + // PathExact: "/hello", + // Methods: []string{"GET", "POST"}, + // PortNames: []string{"web", "admin"}, + // }, + //}, }, }, }, @@ -216,13 +217,14 @@ func TestMeshConfigController_updatesMeshConfig(t *testing.T) { IdentityName: "source-identity", }, }, - DestinationRules: []*pbauth.DestinationRule{ - { - PathExact: "/hello", - Methods: []string{"GET", "POST"}, - PortNames: []string{"web", "admin"}, - }, - }, + // TODO: enable this when L7 traffic permissions are supported + //DestinationRules: []*pbauth.DestinationRule{ + // { + // PathExact: "/hello", + // Methods: []string{"GET", "POST"}, + // PortNames: []string{"web", "admin"}, + // }, + //}, }, }, }, @@ -241,13 +243,13 @@ func TestMeshConfigController_updatesMeshConfig(t *testing.T) { Peer: constants.DefaultConsulPeer, }, }, - DestinationRules: []*pbauth.DestinationRule{ - { - PathExact: "/hello", - Methods: []string{"GET", "POST"}, - PortNames: []string{"web", "admin"}, - }, - }, + //DestinationRules: []*pbauth.DestinationRule{ + // { + // PathExact: "/hello", + // Methods: []string{"GET", "POST"}, + // PortNames: []string{"web", "admin"}, + // }, + //}, }, }, }, @@ -373,13 +375,14 @@ func TestMeshConfigController_deletesMeshConfig(t *testing.T) { IdentityName: "source-identity", }, }, - DestinationRules: []*pbauth.DestinationRule{ - { - PathExact: "/hello", - Methods: []string{"GET", "POST"}, - PortNames: []string{"web", "admin"}, - }, - }, + // TODO: enable this when L7 traffic permissions are supported + //DestinationRules: []*pbauth.DestinationRule{ + // { + // PathExact: "/hello", + // Methods: []string{"GET", "POST"}, + // PortNames: []string{"web", "admin"}, + // }, + //}, }, }, },