mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-04-18 14:59:39 +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
|
return decodeerr
|
||||||
}
|
}
|
||||||
|
|
||||||
d.Set("name", project.Name)
|
_ = d.Set("name", project.Name)
|
||||||
d.Set("key", project.Key)
|
_ = d.Set("key", project.Key)
|
||||||
d.Set("description", project.Description)
|
_ = d.Set("description", project.Description)
|
||||||
d.Set("public", project.Public)
|
_ = d.Set("public", project.Public)
|
||||||
d.Set("avatar", project.Avatar)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ func TestAccBitbucketProject(t *testing.T) {
|
|||||||
resource "bitbucketserver_project" "test" {
|
resource "bitbucketserver_project" "test" {
|
||||||
key = "TEST%v"
|
key = "TEST%v"
|
||||||
name = "test-repo-for-repository-test"
|
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())
|
`, rand.New(rand.NewSource(time.Now().UnixNano())).Int())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user