Skip to content

Commit 1f9c4ba

Browse files
committed
revert api validation test
1 parent 9570a0e commit 1f9c4ba

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

test/apis/v1alpha1/api_validation_integration_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"k8s.io/utils/ptr"
1818

1919
fleetnetv1alpha1 "go.goms.io/fleet-networking/api/v1alpha1"
20-
fleetnetv1beta1 "go.goms.io/fleet-networking/api/v1beta1"
2120
"go.goms.io/fleet-networking/pkg/common/uniquename"
2221
)
2322

@@ -197,7 +196,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
197196
Context("Test ServiceExport API validation - invalid cases", func() {
198197
It("should deny creating API with invalid name size", func() {
199198
// Create the API.
200-
serviceExportName := &fleetnetv1beta1.ServiceExport{
199+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
201200
ObjectMeta: objectMetaWithNameSizeInvalid,
202201
}
203202
By(fmt.Sprintf("expecting denial of CREATE API %s", nameWithInvalidSize))
@@ -208,7 +207,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
208207

209208
It("should deny creating API with invalid name starting with non-alphanumeric character", func() {
210209
// Create the API.
211-
serviceExportName := &fleetnetv1beta1.ServiceExport{
210+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
212211
ObjectMeta: objectMetaWithNameStartingNonAlphanum,
213212
}
214213
By(fmt.Sprintf("expecting denial of CREATE API %s", nameStartingWithNonAlphanum))
@@ -219,7 +218,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
219218

220219
It("should deny creating API with invalid name ending with non-alphanumeric character", func() {
221220
// Create the API.
222-
serviceExportName := &fleetnetv1beta1.ServiceExport{
221+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
223222
ObjectMeta: objectMetaWithNameEndingNonAlphanum,
224223
}
225224
By(fmt.Sprintf("expecting denial of CREATE API %s", nameEndingWithNonAlphanum))
@@ -230,7 +229,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
230229

231230
It("should deny creating API with invalid name containing character that is not alphanumeric and not -", func() {
232231
// Create the API.
233-
serviceExportName := &fleetnetv1beta1.ServiceExport{
232+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
234233
ObjectMeta: objectMetaWithNameContainingUnderscore,
235234
}
236235
By(fmt.Sprintf("expecting denial of CREATE API %s", nameContainsUnderscore))
@@ -243,7 +242,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
243242
Context("Test ServiceExport API validation - valid cases", func() {
244243
It("should allow creating API with valid name size", func() {
245244
// Create the API.
246-
serviceExportName := &fleetnetv1beta1.ServiceExport{
245+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
247246
ObjectMeta: objectMetaWithNameValid,
248247
}
249248
Expect(hubClient.Create(ctx, serviceExportName)).Should(Succeed(), "failed to create serviceExport")
@@ -252,7 +251,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
252251

253252
It("should allow creating API with valid name starting with alphabet character", func() {
254253
// Create the API.
255-
serviceExportName := &fleetnetv1beta1.ServiceExport{
254+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
256255
ObjectMeta: objectMetaWithValidNameStartingAlphabet,
257256
}
258257
Expect(hubClient.Create(ctx, serviceExportName)).Should(Succeed(), "failed to create serviceExport")
@@ -261,7 +260,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
261260

262261
It("should allow creating API with valid name starting with numeric character", func() {
263262
// Create the API.
264-
serviceExportName := &fleetnetv1beta1.ServiceExport{
263+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
265264
ObjectMeta: objectMetaWithValidNameStartingNumber,
266265
}
267266
Expect(hubClient.Create(ctx, serviceExportName)).Should(Succeed(), "failed to create serviceExport")
@@ -270,7 +269,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
270269

271270
It("should allow creating API with valid name ending with alphabet character", func() {
272271
// Create the API.
273-
serviceExportName := &fleetnetv1beta1.ServiceExport{
272+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
274273
ObjectMeta: objectMetaWithValidNameEndingAlphabet,
275274
}
276275
Expect(hubClient.Create(ctx, serviceExportName)).Should(Succeed(), "failed to create serviceExport")
@@ -279,7 +278,7 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
279278

280279
It("should allow creating API with valid name ending with numeric character", func() {
281280
// Create the API.
282-
serviceExportName := &fleetnetv1beta1.ServiceExport{
281+
serviceExportName := &fleetnetv1alpha1.ServiceExport{
283282
ObjectMeta: objectMetaWithValidNameEndingNumber,
284283
}
285284
Expect(hubClient.Create(ctx, serviceExportName)).Should(Succeed(), "failed to create serviceExport")

0 commit comments

Comments
 (0)