mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-07-08 05:45:20 +02:00
Added tests for updating resources
This commit is contained in:
@@ -3,6 +3,7 @@ package bitbucket
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -22,6 +23,8 @@ func TestAccBitbucketResourceGlobalPermissionsGroup(t *testing.T) {
|
||||
}
|
||||
`, groupName)
|
||||
|
||||
configModified := strings.ReplaceAll(config, "ADMIN", "LICENSED_USER")
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
@@ -34,6 +37,14 @@ func TestAccBitbucketResourceGlobalPermissionsGroup(t *testing.T) {
|
||||
resource.TestCheckResourceAttr("bitbucketserver_global_permissions_group.test", "permission", "ADMIN"),
|
||||
),
|
||||
},
|
||||
{
|
||||
Config: configModified,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr("bitbucketserver_global_permissions_group.test", "id", groupName),
|
||||
resource.TestCheckResourceAttr("bitbucketserver_global_permissions_group.test", "group", groupName),
|
||||
resource.TestCheckResourceAttr("bitbucketserver_global_permissions_group.test", "permission", "LICENSED_USER"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user