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 d877f8a commit 6420699
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions octopusdeploy_framework/resource_deployment_freeze_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"strings"
"testing"
"time"
)
Expand All @@ -19,8 +18,7 @@ func TestNewDeploymentFreezeResource(t *testing.T) {
end := fmt.Sprintf("%d-11-21T08:30:00+10:00", time.Now().Year()+1)
updatedEnd := fmt.Sprintf("%d-11-21T08:30:00+10:00", time.Now().Year()+2)
projectName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
environmentName1 := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
environmentName2 := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
environmentName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
spaceName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
projectGroupName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
lifecycleName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
Expand All @@ -36,15 +34,15 @@ func TestNewDeploymentFreezeResource(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "name", name),
resource.TestCheckResourceAttr(resourceName, "start", start),
resource.TestCheckResourceAttr(resourceName, "end", end)),
Config: testDeploymentFreezeBasic(localName, name, start, end, spaceName, []string{environmentName1}, projectName, projectGroupName, lifecycleName),
Config: testDeploymentFreezeBasic(localName, name, start, end, spaceName, environmentName, projectName, projectGroupName, lifecycleName),
},
{
Check: resource.ComposeTestCheckFunc(
testDeploymentFreezeExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "name", name+"1"),
resource.TestCheckResourceAttr(resourceName, "start", start),
resource.TestCheckResourceAttr(resourceName, "end", updatedEnd)),
Config: testDeploymentFreezeBasic(localName, name+"1", start, updatedEnd, spaceName, []string{environmentName1, environmentName2}, projectName, projectGroupName, lifecycleName),
Config: testDeploymentFreezeBasic(localName, name+"1", start, updatedEnd, spaceName, environmentName, projectName, projectGroupName, lifecycleName),
},
},
})
Expand Down

0 comments on commit 6420699

Please sign in to comment.