mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-31 06:23:06 +02:00
Fix issue with project avatar not being returned by project endpoint when reading; ensure only set during update
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user