Skip to content

Commit

Permalink
test for fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
benPearce1 committed Dec 2, 2024
1 parent 6420699 commit 2806290
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions octopusdeploy_framework/resource_deployment_freeze_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,16 @@ func TestNewDeploymentFreezeResource(t *testing.T) {

func testDeploymentFreezeBasic(localName string, freezeName string, start string, end string, spaceName string, environmentName string, projectName string, projectGroupName string, lifecycleName string) string {
spaceLocalName := fmt.Sprintf("space_%s", localName)
projectScopeLocalName := fmt.Sprintf("project_scope_%s", localName)
projectLocalName := fmt.Sprintf("project_%s", localName)
lifecycleLocalName := fmt.Sprintf("lifecycle_%s", localName)
projectGroupLocalName := fmt.Sprintf("project_group_%s", localName)
environmentLocalName := fmt.Sprintf("environment_%s", localName)

projectScopes := fmt.Sprintf(`resource "octopusdeploy_deployment_freeze_project" "%s" {
deploymentfreeze_id = octopusdeploy_deployment_freeze.%s.id
project_id = octopusdeploy_project.%s.id
environment_ids = [ %s ]
}`, projectScopeLocalName, localName, projectLocalName, fmt.Sprintf("octopusdeploy_environment.%s.id", environmentLocalName))

return fmt.Sprintf(`
%s
%s
%s
%s
%s
resource "octopusdeploy_deployment_freeze" "%s" {
name = "%s"
start = "%s"
end = "%s"
}
%s`,
createSpace(spaceLocalName, spaceName),
createEnvironment(spaceLocalName, environmentLocalName, environmentName),
createLifecycle(spaceLocalName, lifecycleLocalName, lifecycleName),
createProjectGroup(spaceLocalName, projectGroupLocalName, projectGroupName),
createProject(spaceLocalName, projectLocalName, projectName, lifecycleLocalName, projectGroupLocalName),
localName, freezeName, start, end, projectScopes)
}`,
createSpace(spaceLocalName, spaceName), localName, freezeName, start, end)
}

//func testDeploymentFreezeBasic(localName string, freezeName string, start string, end string, spaceName string, environments []string, projectName string, projectGroupName string, lifecycleName string) string {
Expand Down

0 comments on commit 2806290

Please sign in to comment.