Skip to content

Commit

Permalink
Merge branch 'dev' into DEVTOOLING-730
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMoyles authored Jul 31, 2024
2 parents 6bf8dc2 + ceaeeb1 commit 30b834e
Show file tree
Hide file tree
Showing 44 changed files with 2,344 additions and 2,193 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ func getArchitectSchedulesIdByNameFn(ctx context.Context, p *architectSchedulesP
return "", true, apiResponse, fmt.Errorf("No architect schedules found with name %s", name)
}

for _, schedules := range *schedules {
if *schedules.Name == name {
log.Printf("Retrieved the architect schedules id %s by name %s", *schedules.Id, name)
return *schedules.Id, false, apiResponse, nil
for _, schedule := range *schedules {
if *schedule.Name == name {
log.Printf("Retrieved the architect schedules id %s by name %s", *schedule.Id, name)
return *schedule.Id, false, apiResponse, nil
}
}

Expand Down
54 changes: 0 additions & 54 deletions genesyscloud/data_source_genesyscloud_architect_schedules.go

This file was deleted.

7 changes: 4 additions & 3 deletions genesyscloud/group/genesyscloud_group_init_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package group

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"sync"
"terraform-provider-genesyscloud/genesyscloud"
"terraform-provider-genesyscloud/genesyscloud/user"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

var providerDataSources map[string]*schema.Resource
Expand All @@ -23,7 +24,7 @@ func (r *registerTestInstance) registerTestResources() {
defer r.resourceMapMutex.Unlock()

providerResources[resourceName] = ResourceGroup()
providerResources["genesyscloud_user"] = genesyscloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()

}

Expand Down
2 changes: 1 addition & 1 deletion genesyscloud/group/resource_genesyscloud_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2"
)

func GetAllGroups(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) {
func getAllGroups(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) {
resources := make(resourceExporter.ResourceIDMetaMap)
groupProxy := getGroupProxy(clientConfig)

Expand Down
2 changes: 1 addition & 1 deletion genesyscloud/group/resource_genesyscloud_group_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func SetRegistrar(regInstance registrar.Registrar) {

func GroupExporter() *resourceExporter.ResourceExporter {
return &resourceExporter.ResourceExporter{
GetResourcesFunc: provider.GetAllWithPooledClient(GetAllGroups),
GetResourcesFunc: provider.GetAllWithPooledClient(getAllGroups),
RefAttrs: map[string]*resourceExporter.RefAttrSettings{
"owner_ids": {RefType: "genesyscloud_user"},
"member_ids": {RefType: "genesyscloud_user"},
Expand Down
10 changes: 6 additions & 4 deletions genesyscloud/group_roles/genesyscloud_group_roles_init_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package group_roles

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"sync"
gcloud "terraform-provider-genesyscloud/genesyscloud"
"terraform-provider-genesyscloud/genesyscloud"
authRole "terraform-provider-genesyscloud/genesyscloud/auth_role"
"terraform-provider-genesyscloud/genesyscloud/group"
"terraform-provider-genesyscloud/genesyscloud/user"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

/*
Expand All @@ -26,10 +28,10 @@ func (r *registerTestInstance) registerTestResources() {
defer r.resourceMapMutex.Unlock()

providerResources["genesyscloud_group_roles"] = ResourceGroupRoles()
providerResources["genesyscloud_user"] = gcloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()
providerResources["genesyscloud_group"] = group.ResourceGroup()
providerResources["genesyscloud_auth_role"] = authRole.ResourceAuthRole()
providerResources["genesyscloud_auth_division"] = gcloud.ResourceAuthDivision()
providerResources["genesyscloud_auth_division"] = genesyscloud.ResourceAuthDivision()
}

// initTestResources initializes all test resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package integration
import (
"sync"
"terraform-provider-genesyscloud/genesyscloud/group"
"testing"

gcloud "terraform-provider-genesyscloud/genesyscloud"
integrationCred "terraform-provider-genesyscloud/genesyscloud/integration_credential"
"terraform-provider-genesyscloud/genesyscloud/user"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down Expand Up @@ -37,7 +36,7 @@ func (r *registerTestInstance) registerTestResources() {
providerResources["genesyscloud_integration"] = ResourceIntegration()
providerResources["genesyscloud_group"] = group.ResourceGroup()
providerResources["genesyscloud_integration_credential"] = integrationCred.ResourceIntegrationCredential()
providerResources["genesyscloud_user"] = gcloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()
}

// registerTestDataSources registers all data sources used in the tests.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package journey_views

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"sync"
"terraform-provider-genesyscloud/genesyscloud"
"terraform-provider-genesyscloud/genesyscloud/user"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

//var providerDataSources map[string]*schema.Resource
Expand All @@ -22,7 +23,7 @@ func (r *registerTestInstance) registerTestResources() {
defer r.resourceMapMutex.Unlock()

providerResources[resourceName] = ResourceJourneyViews()
providerResources["genesyscloud_user"] = genesyscloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package orgauthorization_pairing

import (
"sync"
"terraform-provider-genesyscloud/genesyscloud"
"terraform-provider-genesyscloud/genesyscloud/group"
"terraform-provider-genesyscloud/genesyscloud/user"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand All @@ -27,7 +27,7 @@ func (r *registerTestInstance) registerTestResources() {
defer r.resourceMapMutex.Unlock()

providerResources[resourceName] = ResourceOrgauthorizationPairing()
providerResources["genesyscloud_user"] = genesyscloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()
providerResources["genesyscloud_group"] = group.ResourceGroup()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package orgauthorization_pairing
import (
"fmt"
"strings"
"terraform-provider-genesyscloud/genesyscloud"
"terraform-provider-genesyscloud/genesyscloud/provider"
"terraform-provider-genesyscloud/genesyscloud/user"
"terraform-provider-genesyscloud/genesyscloud/util"
"testing"
"time"
Expand Down Expand Up @@ -41,7 +41,7 @@ func TestAccResourceOrgAuthorizationPairing(t *testing.T) {
PreConfig: func() {
time.Sleep(45 * time.Second)
},
Config: generateUserWithCustomAttrs(testUserResource, testUserEmail, testUserName) + genesyscloud.GenerateBasicUserResource(
Config: generateUserWithCustomAttrs(testUserResource, testUserEmail, testUserName) + user.GenerateBasicUserResource(
userResource1,
email1,
userName1,
Expand All @@ -60,11 +60,11 @@ func TestAccResourceOrgAuthorizationPairing(t *testing.T) {
},
// 2 users and 2 groups
{
Config: generateUserWithCustomAttrs(testUserResource, testUserEmail, testUserName) + genesyscloud.GenerateBasicUserResource(
Config: generateUserWithCustomAttrs(testUserResource, testUserEmail, testUserName) + user.GenerateBasicUserResource(
userResource1,
email1,
userName1,
) + genesyscloud.GenerateBasicUserResource(
) + user.GenerateBasicUserResource(
userResource2,
email2,
userName2,
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestAccResourceOrgAuthorizationPairing(t *testing.T) {
},
// 1 user
{
Config: genesyscloud.GenerateBasicUserResource(
Config: user.GenerateBasicUserResource(
userResource1,
email1,
userName1,
Expand All @@ -114,11 +114,11 @@ func TestAccResourceOrgAuthorizationPairing(t *testing.T) {
},
// 2 users
{
Config: genesyscloud.GenerateBasicUserResource(
Config: user.GenerateBasicUserResource(
userResource1,
email1,
userName1,
) + genesyscloud.GenerateBasicUserResource(
) + user.GenerateBasicUserResource(
userResource2,
email2,
userName2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
authRole "terraform-provider-genesyscloud/genesyscloud/auth_role"
integration "terraform-provider-genesyscloud/genesyscloud/integration"
"terraform-provider-genesyscloud/genesyscloud/provider"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
routingEmailDomain "terraform-provider-genesyscloud/genesyscloud/routing_email_domain"
routingLanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
"terraform-provider-genesyscloud/genesyscloud/user"
userRoles "terraform-provider-genesyscloud/genesyscloud/user_roles"
routingEmailDomain "terraform-provider-genesyscloud/genesyscloud/routing_email_domain"

"testing"

Expand Down Expand Up @@ -50,7 +51,7 @@ func (r *registerTestInstance) registerTestResources() {
providerResources["genesyscloud_routing_queue"] = routingQueue.ResourceRoutingQueue()
providerResources["genesyscloud_auth_role"] = authRole.ResourceAuthRole()
providerResources["genesyscloud_user_roles"] = userRoles.ResourceUserRoles()
providerResources["genesyscloud_user"] = gcloud.ResourceUser()
providerResources["genesyscloud_user"] = user.ResourceUser()
providerResources["genesyscloud_quality_forms_evaluation"] = gcloud.ResourceEvaluationForm()
providerResources["genesyscloud_quality_forms_survey"] = gcloud.ResourceSurveyForm()
providerResources["genesyscloud_integration"] = integration.ResourceIntegration()
Expand Down
Loading

0 comments on commit 30b834e

Please sign in to comment.