@@ -55,20 +55,20 @@ var _ = Describe("Environment API", func() {
55
55
})
56
56
57
57
It ("should create an environment without a resource filter" , func () {
58
- releaseChannels := []string {}
58
+ deploymentVersionChannels := []string {}
59
59
metadata := map [string ]string {
60
60
"test" : "true" ,
61
61
"env" : "integration" ,
62
62
}
63
63
description := "Test environment without resource filter"
64
64
envResp , err := apiClient .CreateEnvironmentWithResponse (ctx , client.CreateEnvironmentJSONRequestBody {
65
- Name : envName ,
66
- Description : & description ,
67
- SystemId : systemID .String (),
68
- PolicyId : nil ,
69
- Metadata : & metadata ,
70
- ResourceFilter : nil ,
71
- ReleaseChannels : & releaseChannels ,
65
+ Name : envName ,
66
+ Description : & description ,
67
+ SystemId : systemID .String (),
68
+ PolicyId : nil ,
69
+ Metadata : & metadata ,
70
+ ResourceFilter : nil ,
71
+ DeploymentVersionChannels : & deploymentVersionChannels ,
72
72
})
73
73
74
74
Expect (err ).NotTo (HaveOccurred (), "Failed to create environment" )
@@ -117,20 +117,20 @@ var _ = Describe("Environment API", func() {
117
117
shortUUID := uuid .New ().String ()[:6 ]
118
118
envName = fmt .Sprintf ("env-empty-filter-%s" , shortUUID )
119
119
120
- releaseChannels := []string {}
120
+ deploymentVersionChannels := []string {}
121
121
metadata := map [string ]string {
122
122
"test" : "true" ,
123
123
"env" : "integration" ,
124
124
}
125
125
description := "Test environment with resource filter"
126
126
envResp , err := apiClient .CreateEnvironmentWithResponse (ctx , client.CreateEnvironmentJSONRequestBody {
127
- Name : envName ,
128
- Description : & description ,
129
- SystemId : systemID .String (),
130
- PolicyId : nil ,
131
- Metadata : & metadata ,
132
- ResourceFilter : & filter ,
133
- ReleaseChannels : & releaseChannels ,
127
+ Name : envName ,
128
+ Description : & description ,
129
+ SystemId : systemID .String (),
130
+ PolicyId : nil ,
131
+ Metadata : & metadata ,
132
+ ResourceFilter : & filter ,
133
+ DeploymentVersionChannels : & deploymentVersionChannels ,
134
134
})
135
135
136
136
Expect (err ).NotTo (HaveOccurred (), "Failed to create environment" )
@@ -175,7 +175,7 @@ var _ = Describe("Environment API", func() {
175
175
176
176
defer func () { safeDeleteTestSystem (ctx , apiClient , systemID ) }()
177
177
178
- releaseChannels := []string {}
178
+ deploymentVersionChannels := []string {}
179
179
envName := fmt .Sprintf ("env-comparison-%s" , uuid .New ().String ()[:6 ])
180
180
filter := map [string ]interface {}{
181
181
"type" : "kind" ,
@@ -188,13 +188,13 @@ var _ = Describe("Environment API", func() {
188
188
}
189
189
description := "Test environment with comparison filter"
190
190
envReq := client.CreateEnvironmentJSONRequestBody {
191
- Name : envName ,
192
- Description : & description ,
193
- SystemId : systemID .String (),
194
- PolicyId : nil ,
195
- Metadata : & metadata ,
196
- ResourceFilter : & filter ,
197
- ReleaseChannels : & releaseChannels ,
191
+ Name : envName ,
192
+ Description : & description ,
193
+ SystemId : systemID .String (),
194
+ PolicyId : nil ,
195
+ Metadata : & metadata ,
196
+ ResourceFilter : & filter ,
197
+ DeploymentVersionChannels : & deploymentVersionChannels ,
198
198
}
199
199
200
200
Logger .Debug ("creating environment with comparison filter" ,
@@ -249,7 +249,7 @@ var _ = Describe("Environment API", func() {
249
249
Expect (err ).NotTo (HaveOccurred ())
250
250
defer safeDeleteTestSystem (ctx , apiClient , systemID )
251
251
252
- releaseChannels := []string {}
252
+ deploymentVersionChannels := []string {}
253
253
envName := fmt .Sprintf ("env-metadata-%s" , uuid .New ().String ()[:6 ])
254
254
filter := map [string ]interface {}{
255
255
"type" : "metadata" ,
@@ -263,13 +263,13 @@ var _ = Describe("Environment API", func() {
263
263
}
264
264
description := "Test environment with metadata filter"
265
265
envReq := client.CreateEnvironmentJSONRequestBody {
266
- Name : envName ,
267
- Description : & description ,
268
- SystemId : systemID .String (),
269
- PolicyId : nil ,
270
- Metadata : & metadata ,
271
- ResourceFilter : & filter ,
272
- ReleaseChannels : & releaseChannels ,
266
+ Name : envName ,
267
+ Description : & description ,
268
+ SystemId : systemID .String (),
269
+ PolicyId : nil ,
270
+ Metadata : & metadata ,
271
+ ResourceFilter : & filter ,
272
+ DeploymentVersionChannels : & deploymentVersionChannels ,
273
273
}
274
274
275
275
Logger .Debug ("creating environment with metadata filter" ,
@@ -326,7 +326,7 @@ var _ = Describe("Environment API", func() {
326
326
327
327
defer func () { safeDeleteTestSystem (ctx , apiClient , systemID ) }()
328
328
329
- releaseChannels := []string {}
329
+ deploymentVersionChannels := []string {}
330
330
envName := fmt .Sprintf ("env-simple-filter-%s" , uuid .New ().String ()[:6 ])
331
331
filter := map [string ]interface {}{
332
332
"type" : "metadata" ,
@@ -340,13 +340,13 @@ var _ = Describe("Environment API", func() {
340
340
}
341
341
description := "Test environment with simple filter"
342
342
envReq := client.CreateEnvironmentJSONRequestBody {
343
- Name : envName ,
344
- Description : & description ,
345
- SystemId : systemID .String (),
346
- PolicyId : nil ,
347
- Metadata : & metadata ,
348
- ResourceFilter : & filter ,
349
- ReleaseChannels : & releaseChannels ,
343
+ Name : envName ,
344
+ Description : & description ,
345
+ SystemId : systemID .String (),
346
+ PolicyId : nil ,
347
+ Metadata : & metadata ,
348
+ ResourceFilter : & filter ,
349
+ DeploymentVersionChannels : & deploymentVersionChannels ,
350
350
}
351
351
352
352
Logger .Debug ("creating environment with simple filter" ,
@@ -399,7 +399,7 @@ var _ = Describe("Environment API", func() {
399
399
Expect (err ).NotTo (HaveOccurred ())
400
400
defer safeDeleteTestSystem (ctx , apiClient , systemID )
401
401
402
- releaseChannels := []string {}
402
+ deploymentVersionChannels := []string {}
403
403
envName := fmt .Sprintf ("env-complex-filter-%s" , uuid .New ().String ()[:6 ])
404
404
filter := map [string ]interface {}{
405
405
"not" : false ,
@@ -425,13 +425,13 @@ var _ = Describe("Environment API", func() {
425
425
}
426
426
description := "Test environment with complex filter"
427
427
envReq := client.CreateEnvironmentJSONRequestBody {
428
- Name : envName ,
429
- Description : & description ,
430
- SystemId : systemID .String (),
431
- PolicyId : nil ,
432
- Metadata : & metadata ,
433
- ResourceFilter : & filter ,
434
- ReleaseChannels : & releaseChannels ,
428
+ Name : envName ,
429
+ Description : & description ,
430
+ SystemId : systemID .String (),
431
+ PolicyId : nil ,
432
+ Metadata : & metadata ,
433
+ ResourceFilter : & filter ,
434
+ DeploymentVersionChannels : & deploymentVersionChannels ,
435
435
}
436
436
437
437
Logger .Debug ("creating environment with complex filter" ,
@@ -500,7 +500,7 @@ var _ = Describe("Environment API", func() {
500
500
Expect (err ).NotTo (HaveOccurred ())
501
501
defer safeDeleteTestSystem (ctx , apiClient , systemID )
502
502
503
- releaseChannels := []string {}
503
+ deploymentVersionChannels := []string {}
504
504
envName := fmt .Sprintf ("env-date-filter-%s" , uuid .New ().String ()[:6 ])
505
505
506
506
// Create a resource filter with a date condition
@@ -533,13 +533,13 @@ var _ = Describe("Environment API", func() {
533
533
}
534
534
description := "Test environment with date condition filter"
535
535
envReq := client.CreateEnvironmentJSONRequestBody {
536
- Name : envName ,
537
- Description : & description ,
538
- SystemId : systemID .String (),
539
- PolicyId : nil ,
540
- Metadata : & metadata ,
541
- ResourceFilter : & filter ,
542
- ReleaseChannels : & releaseChannels ,
536
+ Name : envName ,
537
+ Description : & description ,
538
+ SystemId : systemID .String (),
539
+ PolicyId : nil ,
540
+ Metadata : & metadata ,
541
+ ResourceFilter : & filter ,
542
+ DeploymentVersionChannels : & deploymentVersionChannels ,
543
543
}
544
544
545
545
Logger .Debug ("creating environment with date condition filter" ,
@@ -650,7 +650,7 @@ var _ = Describe("Environment API", func() {
650
650
}
651
651
652
652
createdEnvs := make ([]uuid.UUID , 0 , len (environments ))
653
- releaseChannels := []string {}
653
+ deploymentVersionChannels := []string {}
654
654
655
655
for _ , env := range environments {
656
656
description := fmt .Sprintf ("Test environment for %s" , env .name )
@@ -660,13 +660,13 @@ var _ = Describe("Environment API", func() {
660
660
}
661
661
662
662
envReq := client.CreateEnvironmentJSONRequestBody {
663
- Name : env .name ,
664
- Description : & description ,
665
- SystemId : systemID .String (),
666
- PolicyId : nil ,
667
- Metadata : & metadata ,
668
- ResourceFilter : & env .filter ,
669
- ReleaseChannels : & releaseChannels ,
663
+ Name : env .name ,
664
+ Description : & description ,
665
+ SystemId : systemID .String (),
666
+ PolicyId : nil ,
667
+ Metadata : & metadata ,
668
+ ResourceFilter : & env .filter ,
669
+ DeploymentVersionChannels : & deploymentVersionChannels ,
670
670
}
671
671
672
672
Logger .Debug ("creating environment" ,
@@ -697,7 +697,7 @@ var _ = Describe("Environment API", func() {
697
697
Expect (err ).NotTo (HaveOccurred ())
698
698
defer safeDeleteTestSystem (ctx , apiClient , systemID )
699
699
700
- releaseChannels := []string {}
700
+ deploymentVersionChannels := []string {}
701
701
envName := fmt .Sprintf ("env-nested-comp-%s" , uuid .New ().String ()[:6 ])
702
702
703
703
// Create a resource filter with nested comparison conditions
@@ -737,13 +737,13 @@ var _ = Describe("Environment API", func() {
737
737
}
738
738
description := "Test environment with nested comparison conditions"
739
739
envReq := client.CreateEnvironmentJSONRequestBody {
740
- Name : envName ,
741
- Description : & description ,
742
- SystemId : systemID .String (),
743
- PolicyId : nil ,
744
- Metadata : & metadata ,
745
- ResourceFilter : & filter ,
746
- ReleaseChannels : & releaseChannels ,
740
+ Name : envName ,
741
+ Description : & description ,
742
+ SystemId : systemID .String (),
743
+ PolicyId : nil ,
744
+ Metadata : & metadata ,
745
+ ResourceFilter : & filter ,
746
+ DeploymentVersionChannels : & deploymentVersionChannels ,
747
747
}
748
748
749
749
Logger .Debug ("creating environment with nested comparison conditions" ,
@@ -800,7 +800,7 @@ var _ = Describe("Environment API", func() {
800
800
Expect (err ).NotTo (HaveOccurred ())
801
801
defer safeDeleteTestSystem (ctx , apiClient , systemID )
802
802
803
- releaseChannels := []string {}
803
+ deploymentVersionChannels := []string {}
804
804
envName := fmt .Sprintf ("env-mixed-conditions-%s" , uuid .New ().String ()[:6 ])
805
805
806
806
// Create a resource filter with mixed condition types
@@ -834,13 +834,13 @@ var _ = Describe("Environment API", func() {
834
834
}
835
835
description := "Test environment with mixed condition types"
836
836
envReq := client.CreateEnvironmentJSONRequestBody {
837
- Name : envName ,
838
- Description : & description ,
839
- SystemId : systemID .String (),
840
- PolicyId : nil ,
841
- Metadata : & metadata ,
842
- ResourceFilter : & filter ,
843
- ReleaseChannels : & releaseChannels ,
837
+ Name : envName ,
838
+ Description : & description ,
839
+ SystemId : systemID .String (),
840
+ PolicyId : nil ,
841
+ Metadata : & metadata ,
842
+ ResourceFilter : & filter ,
843
+ DeploymentVersionChannels : & deploymentVersionChannels ,
844
844
}
845
845
846
846
Logger .Debug ("creating environment with mixed condition types" ,
@@ -906,7 +906,7 @@ var _ = Describe("Environment API", func() {
906
906
Expect (err ).NotTo (HaveOccurred ())
907
907
defer safeDeleteTestSystem (ctx , apiClient , systemID )
908
908
909
- releaseChannels := []string {}
909
+ deploymentVersionChannels := []string {}
910
910
envName := fmt .Sprintf ("env-deep-nesting-%s" , uuid .New ().String ()[:6 ])
911
911
912
912
// Create a resource filter with 3 levels of nesting
@@ -957,13 +957,13 @@ var _ = Describe("Environment API", func() {
957
957
}
958
958
description := "Test environment with deeply nested conditions"
959
959
envReq := client.CreateEnvironmentJSONRequestBody {
960
- Name : envName ,
961
- Description : & description ,
962
- SystemId : systemID .String (),
963
- PolicyId : nil ,
964
- Metadata : & metadata ,
965
- ResourceFilter : & filter ,
966
- ReleaseChannels : & releaseChannels ,
960
+ Name : envName ,
961
+ Description : & description ,
962
+ SystemId : systemID .String (),
963
+ PolicyId : nil ,
964
+ Metadata : & metadata ,
965
+ ResourceFilter : & filter ,
966
+ DeploymentVersionChannels : & deploymentVersionChannels ,
967
967
}
968
968
969
969
Logger .Debug ("creating environment with deeply nested conditions" ,
0 commit comments