@@ -3327,65 +3327,66 @@ func TestK8sPodAuthTargetResource(t *testing.T) {
3327
3327
})
3328
3328
}
3329
3329
3330
- func TestVariableResource (t * testing.T ) {
3331
- testFramework := test.OctopusContainerTest {}
3332
- testFramework .ArrangeTest (t , func (t * testing.T , container * test.OctopusContainer , spaceClient * client.Client ) error {
3333
- // Act
3334
- newSpaceId , err := testFramework .Act (t , container , "./terraform" , "49-variables" , []string {})
3335
-
3336
- if err != nil {
3337
- return err
3338
- }
3339
-
3340
- // Assert
3341
- client , err := octoclient .CreateClient (container .URI , newSpaceId , test .ApiKey )
3342
- project , err := client .Projects .GetByName ("Test" )
3343
- variableSet , err := client .Variables .GetAll (project .ID )
3344
-
3345
- if err != nil {
3346
- return err
3347
- }
3348
-
3349
- if len (variableSet .Variables ) != 7 {
3350
- t .Fatalf ("Expected 7 variables to be created." )
3351
- }
3352
-
3353
- for _ , variable := range variableSet .Variables {
3354
- switch variable .Name {
3355
- case "UnscopedVariable" :
3356
- if ! variable .Scope .IsEmpty () {
3357
- t .Fatalf ("Expected UnscopedVariable to have no scope values." )
3358
- }
3359
- case "ActionScopedVariable" :
3360
- if len (variable .Scope .Actions ) == 0 {
3361
- t .Fatalf ("Expected ActionScopedVariable to have action scope." )
3362
- }
3363
- case "ChannelScopedVariable" :
3364
- if len (variable .Scope .Channels ) == 0 {
3365
- t .Fatalf ("Expected ChannelScopedVariable to have channel scope." )
3366
- }
3367
- case "EnvironmentScopedVariable" :
3368
- if len (variable .Scope .Environments ) == 0 {
3369
- t .Fatalf ("Expected EnvironmentScopedVariable to have environment scope." )
3370
- }
3371
- case "MachineScopedVariable" :
3372
- if len (variable .Scope .Machines ) == 0 {
3373
- t .Fatalf ("Expected MachineScopedVariable to have machine scope." )
3374
- }
3375
- case "ProcessScopedVariable" :
3376
- if len (variable .Scope .ProcessOwners ) == 0 {
3377
- t .Fatalf ("Expected ProcessScopedVariable to have process scope." )
3378
- }
3379
- case "RoleScopedVariable" :
3380
- if len (variable .Scope .Roles ) == 0 {
3381
- t .Fatalf ("Expected RoleScopedVariable to have role scope." )
3382
- }
3383
- }
3384
- }
3385
-
3386
- return nil
3387
- })
3388
- }
3330
+ // TODO: return this variable test to the test suite following the migration of variable resources
3331
+ //func TestVariableResource(t *testing.T) {
3332
+ // testFramework := test.OctopusContainerTest{}
3333
+ // testFramework.ArrangeTest(t, func(t *testing.T, container *test.OctopusContainer, spaceClient *client.Client) error {
3334
+ // // Act
3335
+ // newSpaceId, err := testFramework.Act(t, container, "./terraform", "49-variables", []string{})
3336
+ //
3337
+ // if err != nil {
3338
+ // return err
3339
+ // }
3340
+ //
3341
+ // // Assert
3342
+ // client, err := octoclient.CreateClient(container.URI, newSpaceId, test.ApiKey)
3343
+ // project, err := client.Projects.GetByName("Test")
3344
+ // variableSet, err := client.Variables.GetAll(project.ID)
3345
+ //
3346
+ // if err != nil {
3347
+ // return err
3348
+ // }
3349
+ //
3350
+ // if len(variableSet.Variables) != 7 {
3351
+ // t.Fatalf("Expected 7 variables to be created.")
3352
+ // }
3353
+ //
3354
+ // for _, variable := range variableSet.Variables {
3355
+ // switch variable.Name {
3356
+ // case "UnscopedVariable":
3357
+ // if !variable.Scope.IsEmpty() {
3358
+ // t.Fatalf("Expected UnscopedVariable to have no scope values.")
3359
+ // }
3360
+ // case "ActionScopedVariable":
3361
+ // if len(variable.Scope.Actions) == 0 {
3362
+ // t.Fatalf("Expected ActionScopedVariable to have action scope.")
3363
+ // }
3364
+ // case "ChannelScopedVariable":
3365
+ // if len(variable.Scope.Channels) == 0 {
3366
+ // t.Fatalf("Expected ChannelScopedVariable to have channel scope.")
3367
+ // }
3368
+ // case "EnvironmentScopedVariable":
3369
+ // if len(variable.Scope.Environments) == 0 {
3370
+ // t.Fatalf("Expected EnvironmentScopedVariable to have environment scope.")
3371
+ // }
3372
+ // case "MachineScopedVariable":
3373
+ // if len(variable.Scope.Machines) == 0 {
3374
+ // t.Fatalf("Expected MachineScopedVariable to have machine scope.")
3375
+ // }
3376
+ // case "ProcessScopedVariable":
3377
+ // if len(variable.Scope.ProcessOwners) == 0 {
3378
+ // t.Fatalf("Expected ProcessScopedVariable to have process scope.")
3379
+ // }
3380
+ // case "RoleScopedVariable":
3381
+ // if len(variable.Scope.Roles) == 0 {
3382
+ // t.Fatalf("Expected RoleScopedVariable to have role scope.")
3383
+ // }
3384
+ // }
3385
+ // }
3386
+ //
3387
+ // return nil
3388
+ // })
3389
+ //}
3389
3390
3390
3391
// TestTerraformApplyStepWithWorkerPool verifies that a terraform apply step with a custom worker pool is deployed successfully
3391
3392
// See https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/issues/601
0 commit comments