Skip to content

Commit 2645468

Browse files
authored
chore: conformance profiles renamed (#3019)
Signed-off-by: Mattia Lavacca <[email protected]>
1 parent 7ee900d commit 2645468

File tree

2 files changed

+48
-32
lines changed

2 files changed

+48
-32
lines changed

conformance/utils/suite/profiles.go

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,36 @@ type ConformanceProfile struct {
4242
type ConformanceProfileName string
4343

4444
const (
45-
// HTTPConformanceProfileName indicates the name of the conformance profile
46-
// which covers HTTP functionality, such as the HTTPRoute API.
47-
HTTPConformanceProfileName ConformanceProfileName = "HTTP"
45+
// GatewayHTTPConformanceProfileName indicates the name of the conformance profile
46+
// which covers HTTP functionality with Gateways.
47+
GatewayHTTPConformanceProfileName ConformanceProfileName = "GATEWAY-HTTP"
4848

49-
// TLSConformanceProfileName indicates the name of the conformance profile
50-
// which covers TLS stream functionality, such as the TLSRoute API.
51-
TLSConformanceProfileName ConformanceProfileName = "TLS"
49+
// GatewayTLSConformanceProfileName indicates the name of the conformance profile
50+
// which covers TLS stream functionality with Gateways.
51+
GatewayTLSConformanceProfileName ConformanceProfileName = "GATEWAY-TLS"
5252

53-
// GRPCConformanceProfileName indicates the name of the conformance profile
54-
// which covers GRPC functionality, such as the GRPCRoute API.
55-
GRPCConformanceProfileName ConformanceProfileName = "GRPC"
53+
// GatewayGRPCConformanceProfileName indicates the name of the conformance profile
54+
// which covers GRPC functionality with Gateways.
55+
GatewayGRPCConformanceProfileName ConformanceProfileName = "GATEWAY-GRPC"
5656

57-
// MeshConformanceProfileName indicates the name of the conformance profile
58-
// which covers service mesh functionality.
59-
MeshConformanceProfileName ConformanceProfileName = "MESH"
57+
// MeshHTTPConformanceProfileName indicates the name of the conformance profile
58+
// which covers HTTP functionality with service mesh.
59+
MeshHTTPConformanceProfileName ConformanceProfileName = "MESH-HTTP"
60+
61+
// MeshGRPCConformanceProfileName indicates the name of the conformance profile
62+
// which covers GRPC functionality with service mesh.
63+
MeshGRPCConformanceProfileName ConformanceProfileName = "MESH-GRPC"
6064
)
6165

6266
// -----------------------------------------------------------------------------
6367
// Conformance Profiles - Public Vars
6468
// -----------------------------------------------------------------------------
6569

6670
var (
67-
// HTTPConformanceProfile is a ConformanceProfile that covers testing HTTP
71+
// GatewayHTTPConformanceProfile is a ConformanceProfile that covers testing HTTP
6872
// related functionality with Gateways.
69-
HTTPConformanceProfile = ConformanceProfile{
70-
Name: HTTPConformanceProfileName,
73+
GatewayHTTPConformanceProfile = ConformanceProfile{
74+
Name: GatewayHTTPConformanceProfileName,
7175
CoreFeatures: sets.New(
7276
features.SupportGateway,
7377
features.SupportReferenceGrant,
@@ -78,10 +82,10 @@ var (
7882
Insert(features.HTTPRouteExtendedFeatures.UnsortedList()...),
7983
}
8084

81-
// TLSConformanceProfile is a ConformanceProfile that covers testing TLS
85+
// GatewayTLSConformanceProfile is a ConformanceProfile that covers testing TLS
8286
// related functionality with Gateways.
83-
TLSConformanceProfile = ConformanceProfile{
84-
Name: TLSConformanceProfileName,
87+
GatewayTLSConformanceProfile = ConformanceProfile{
88+
Name: GatewayTLSConformanceProfileName,
8589
CoreFeatures: sets.New(
8690
features.SupportGateway,
8791
features.SupportReferenceGrant,
@@ -90,27 +94,38 @@ var (
9094
ExtendedFeatures: features.GatewayExtendedFeatures,
9195
}
9296

93-
// GRPCConformanceProfile is a ConformanceProfile that covers testing GRPC
97+
// GatewayGRPCConformanceProfile is a ConformanceProfile that covers testing GRPC
9498
// related functionality with Gateways.
95-
GRPCConformanceProfile = ConformanceProfile{
96-
Name: GRPCConformanceProfileName,
99+
GatewayGRPCConformanceProfile = ConformanceProfile{
100+
Name: GatewayGRPCConformanceProfileName,
97101
CoreFeatures: sets.New(
98102
features.SupportGateway,
99103
features.SupportReferenceGrant,
100104
features.SupportGRPCRoute,
101105
),
106+
ExtendedFeatures: features.GatewayExtendedFeatures,
102107
}
103108

104-
// MeshConformanceProfile is a ConformanceProfile that covers testing
109+
// MeshHTTPConformanceProfile is a ConformanceProfile that covers testing HTTP
105110
// service mesh related functionality.
106-
MeshConformanceProfile = ConformanceProfile{
107-
Name: MeshConformanceProfileName,
111+
MeshHTTPConformanceProfile = ConformanceProfile{
112+
Name: MeshHTTPConformanceProfileName,
108113
CoreFeatures: sets.New(
109114
features.SupportMesh,
110115
features.SupportHTTPRoute,
111116
),
112117
ExtendedFeatures: features.HTTPRouteExtendedFeatures,
113118
}
119+
120+
// MeshGRPCConformanceProfile is a ConformanceProfile that covers testing GRPC
121+
// service mesh related functionality.
122+
MeshGRPCConformanceProfile = ConformanceProfile{
123+
Name: MeshHTTPConformanceProfileName,
124+
CoreFeatures: sets.New(
125+
features.SupportMesh,
126+
features.SupportGRPCRoute,
127+
),
128+
}
114129
)
115130

116131
// RegisterConformanceProfile allows downstream tests to register unique profiles that
@@ -130,10 +145,11 @@ func RegisterConformanceProfile(p ConformanceProfile) {
130145
// conformanceProfileMap maps short human-readable names to their respective
131146
// ConformanceProfiles.
132147
var conformanceProfileMap = map[ConformanceProfileName]ConformanceProfile{
133-
HTTPConformanceProfileName: HTTPConformanceProfile,
134-
TLSConformanceProfileName: TLSConformanceProfile,
135-
GRPCConformanceProfileName: GRPCConformanceProfile,
136-
MeshConformanceProfileName: MeshConformanceProfile,
148+
GatewayHTTPConformanceProfileName: GatewayHTTPConformanceProfile,
149+
GatewayTLSConformanceProfileName: GatewayTLSConformanceProfile,
150+
GatewayGRPCConformanceProfileName: GatewayGRPCConformanceProfile,
151+
MeshHTTPConformanceProfileName: MeshHTTPConformanceProfile,
152+
MeshGRPCConformanceProfileName: MeshGRPCConformanceProfile,
137153
}
138154

139155
// getConformanceProfileForName retrieves a known ConformanceProfile by its simple

conformance/utils/suite/reports_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestBuildSummary(t *testing.T) {
3333
{
3434
name: "core tests failed, no extended tests",
3535
report: confv1.ProfileReport{
36-
Name: string(HTTPConformanceProfileName),
36+
Name: string(GatewayHTTPConformanceProfileName),
3737
Core: confv1.Status{
3838
Result: confv1.Failure,
3939
Statistics: confv1.Statistics{
@@ -47,7 +47,7 @@ func TestBuildSummary(t *testing.T) {
4747
{
4848
name: "core tests succeeded, extended tests failed",
4949
report: confv1.ProfileReport{
50-
Name: string(HTTPConformanceProfileName),
50+
Name: string(GatewayHTTPConformanceProfileName),
5151
Core: confv1.Status{
5252
Result: confv1.Success,
5353
Statistics: confv1.Statistics{
@@ -69,7 +69,7 @@ func TestBuildSummary(t *testing.T) {
6969
{
7070
name: "core tests partially succeeded, extended tests succeeded",
7171
report: confv1.ProfileReport{
72-
Name: string(HTTPConformanceProfileName),
72+
Name: string(GatewayHTTPConformanceProfileName),
7373
Core: confv1.Status{
7474
Result: confv1.Partial,
7575
Statistics: confv1.Statistics{
@@ -91,7 +91,7 @@ func TestBuildSummary(t *testing.T) {
9191
{
9292
name: "core tests succeeded, extended tests partially succeeded",
9393
report: confv1.ProfileReport{
94-
Name: string(HTTPConformanceProfileName),
94+
Name: string(GatewayHTTPConformanceProfileName),
9595
Core: confv1.Status{
9696
Result: confv1.Success,
9797
Statistics: confv1.Statistics{

0 commit comments

Comments
 (0)