Skip to content

Commit

Permalink
Fix issue with project avatar not being returned by project endpoint …
Browse files Browse the repository at this point in the history
…when reading; ensure only set during update
  • Loading branch information
gavinbunney committed Oct 17, 2019
1 parent e2328f8 commit bf6be8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bitbucket/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ func resourceProjectRead(d *schema.ResourceData, m interface{}) error {
return decodeerr
}

d.Set("name", project.Name)
d.Set("key", project.Key)
d.Set("description", project.Description)
d.Set("public", project.Public)
d.Set("avatar", project.Avatar)
_ = d.Set("name", project.Name)
_ = d.Set("key", project.Key)
_ = d.Set("description", project.Description)
_ = d.Set("public", project.Public)
}

return nil
Expand Down
2 changes: 2 additions & 0 deletions bitbucket/resource_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func TestAccBitbucketProject(t *testing.T) {
resource "bitbucketserver_project" "test" {
key = "TEST%v"
name = "test-repo-for-repository-test"
description = "My description"
avatar = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg=="
}
`, rand.New(rand.NewSource(time.Now().UnixNano())).Int())

Expand Down

0 comments on commit bf6be8c

Please sign in to comment.