Skip to content

Commit

Permalink
Merge pull request #18 from docker/fix-resource-repo-test
Browse files Browse the repository at this point in the history
fix resource repo test
  • Loading branch information
ryanhristovski authored Aug 20, 2024
2 parents f531b5a + a48928a commit 7226026
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/provider/resource_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ func TestRepositoryResource(t *testing.T) {
resource.TestCheckResourceAttr("dockerhub_repository.test", "name", "example-repo"),
resource.TestCheckResourceAttr("dockerhub_repository.test", "namespace", os.Getenv("DOCKERHUB_USERNAME")),
resource.TestCheckResourceAttr("dockerhub_repository.test", "description", "Example repository"),
resource.TestCheckResourceAttr("dockerhub_repository.test", "full_description", ""),
resource.TestCheckNoResourceAttr("dockerhub_repository.test", "full_description"),
resource.TestCheckResourceAttr("dockerhub_repository.test", "private", "false"),
),
},
{
Config: testRepositoryResourceConfigUpdated(),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("dockerhub_repository.test", "description", "Updated example repository"),
resource.TestCheckResourceAttr("dockerhub_repository.test", "full_description", ""),
resource.TestCheckResourceAttr("dockerhub_repository.test", "full_description", "Full description update"),
resource.TestCheckResourceAttr("dockerhub_repository.test", "private", "true"),
),
},
Expand All @@ -51,7 +51,6 @@ resource "dockerhub_repository" "test" {
name = "example-repo"
namespace = "` + os.Getenv("DOCKERHUB_USERNAME") + `"
description = "Example repository"
full_description = ""
private = false
}
`
Expand All @@ -63,7 +62,7 @@ resource "dockerhub_repository" "test" {
name = "example-repo"
namespace = "` + os.Getenv("DOCKERHUB_USERNAME") + `"
description = "Updated example repository"
full_description = ""
full_description = "Full description update"
private = true
}
`
Expand Down

0 comments on commit 7226026

Please sign in to comment.