Skip to content

Commit

Permalink
merge latest and update
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacCalligeros95 committed Jul 31, 2024
1 parent aa4879a commit 292315c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
4 changes: 4 additions & 0 deletions octopusdeploy/testing_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func (suite *IntegrationTestSuite) SetupSuite() {
if suite.err != nil {
log.Printf("Failed to create client: (%s)", suite.err.Error())
}
octoContainer = &test.OctopusContainer{
Container: nil,
URI: url,
}
}
}
}
Expand Down
33 changes: 28 additions & 5 deletions octopusdeploy_framework/resource_tenant_project_variable_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package octopusdeploy
package octopusdeploy_framework

import (
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"strings"
)

Expand Down Expand Up @@ -35,7 +35,7 @@ func (suite *IntegrationTestSuite) TestAccTenantProjectVariableBasic() {

resource.Test(suite.T(), resource.TestCase{
CheckDestroy: testAccTenantProjectVariableCheckDestroy,
PreCheck: func() { testAccPreCheck(suite.T()) },
PreCheck: func() { TestAccPreCheck(suite.T()) },
ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
Steps: []resource.TestStep{
{
Expand Down Expand Up @@ -172,3 +172,26 @@ func testAccTenantProjectVariableCheckDestroy(s *terraform.State) error {

return nil
}

func testAccProjectWithTemplate(localName string, name string, lifecycleLocalName string, projectGroupLocalName string) string {
return fmt.Sprintf(`resource "octopusdeploy_project" "%s" {
lifecycle_id = octopusdeploy_lifecycle.%s.id
name = "%s"
project_group_id = octopusdeploy_project_group.%s.id
template {
name = "project variable template name"
label = "project variable template label"
display_settings = {
"Octopus.ControlType" = "Sensitive"
}
}
}`, localName, lifecycleLocalName, name, projectGroupLocalName)
}

func testAccProjectGroup(localName string, name string) string {
return fmt.Sprintf(`resource "octopusdeploy_project_group" "%s" {
name = "%s"
}`, localName, name)
}
4 changes: 4 additions & 0 deletions octopusdeploy_framework/testing_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func (suite *IntegrationTestSuite) SetupSuite() {
if suite.err != nil {
log.Printf("Failed to create client: (%s)", suite.err.Error())
}
octoContainer = &test.OctopusContainer{
Container: nil,
URI: url,
}
}
}
}
Expand Down

0 comments on commit 292315c

Please sign in to comment.