From 3786ac7a50e89ed825a7caeb75df1b9f7f3c7426 Mon Sep 17 00:00:00 2001 From: Marcin Skalski Date: Tue, 24 Sep 2024 19:50:17 +0200 Subject: [PATCH] fix(e2e): code review Signed-off-by: Marcin Skalski --- .../_rules/meshgateway_endpoint.golden.json | 0 .../_rules/meshgateway_endpoint.input.yaml | 0 .../_rules/meshgateway_from_global.golden.json | 0 .../_rules/meshgateway_from_global.input.yaml | 0 .../_rules/meshgateway_from_zone.golden.json | 0 .../_rules/meshgateway_from_zone.input.yaml | 0 ...policies_from_different_zones.dataplane.yaml} | 0 ...=> policies_from_different_zones.golden.yaml} | 16 ++++++++-------- ... policies_from_different_zones.policies.yaml} | 8 ++++---- 9 files changed, 12 insertions(+), 12 deletions(-) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_endpoint.golden.json (100%) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_endpoint.input.yaml (100%) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_from_global.golden.json (100%) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_from_global.input.yaml (100%) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_from_zone.golden.json (100%) rename pkg/api-server/testdata/resources/inspect/{dataplanes => meshgateways}/_rules/meshgateway_from_zone.input.yaml (100%) rename pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/{03.dataplane.yaml => policies_from_different_zones.dataplane.yaml} (100%) rename pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/{03.golden.yaml => policies_from_different_zones.golden.yaml} (93%) rename pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/{03.policies.yaml => policies_from_different_zones.policies.yaml} (94%) diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_endpoint.golden.json b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_endpoint.golden.json similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_endpoint.golden.json rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_endpoint.golden.json diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_endpoint.input.yaml b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_endpoint.input.yaml similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_endpoint.input.yaml rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_endpoint.input.yaml diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_global.golden.json b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_global.golden.json similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_global.golden.json rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_global.golden.json diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_global.input.yaml b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_global.input.yaml similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_global.input.yaml rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_global.input.yaml diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_zone.golden.json b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_zone.golden.json similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_zone.golden.json rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_zone.golden.json diff --git a/pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_zone.input.yaml b/pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_zone.input.yaml similarity index 100% rename from pkg/api-server/testdata/resources/inspect/dataplanes/_rules/meshgateway_from_zone.input.yaml rename to pkg/api-server/testdata/resources/inspect/meshgateways/_rules/meshgateway_from_zone.input.yaml diff --git a/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.dataplane.yaml b/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.dataplane.yaml similarity index 100% rename from pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.dataplane.yaml rename to pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.dataplane.yaml diff --git a/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.golden.yaml b/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.golden.yaml similarity index 93% rename from pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.golden.yaml rename to pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.golden.yaml index 4767f358a041..0b26208d337d 100644 --- a/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.golden.yaml +++ b/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.golden.yaml @@ -18,7 +18,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog Subset: [] 127.0.0.1:8081: @@ -35,7 +35,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog - creationTime: "0001-01-01T00:00:00Z" labels: @@ -43,7 +43,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: servicesubset + name: in-zone-1 type: MeshAccessLog Subset: [] 127.0.0.1:8082: @@ -60,7 +60,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog Subset: [] ByListenerAndHostname: @@ -78,7 +78,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog Subset: [] 127.0.0.1:8081:*: @@ -95,7 +95,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog - creationTime: "0001-01-01T00:00:00Z" labels: @@ -103,7 +103,7 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: servicesubset + name: in-zone-1 type: MeshAccessLog Subset: [] 127.0.0.1:8082:*: @@ -120,6 +120,6 @@ ToRules: kuma.io/zone: zone-1 mesh: mesh-1 modificationTime: "0001-01-01T00:00:00Z" - name: mesh + name: mesh-in-zone-1 type: MeshAccessLog Subset: [] diff --git a/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.policies.yaml b/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.policies.yaml similarity index 94% rename from pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.policies.yaml rename to pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.policies.yaml index 5514e99ec696..f191cb28bb07 100644 --- a/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/03.policies.yaml +++ b/pkg/plugins/policies/core/matchers/testdata/matchedpolicies/meshgateways/policies_from_different_zones.policies.yaml @@ -1,7 +1,7 @@ --- type: MeshAccessLog mesh: mesh-1 -name: mesh +name: mesh-in-zone-1 labels: kuma.io/origin: zone kuma.io/zone: zone-1 @@ -19,7 +19,7 @@ spec: --- type: MeshAccessLog mesh: mesh-1 -name: servicesubset +name: in-zone-1 labels: kuma.io/origin: zone kuma.io/zone: zone-1 @@ -40,7 +40,7 @@ spec: --- type: MeshAccessLog mesh: mesh-1 -name: gateway +name: in-zone-2 labels: kuma.io/origin: zone kuma.io/zone: zone-2 @@ -67,7 +67,7 @@ spec: --- type: MeshGateway mesh: mesh-1 -name: gateway-3 +name: gateway-in-zone-1 labels: kuma.io/origin: zone kuma.io/zone: zone-1