Skip to content

Commit

Permalink
Refactor Routing language
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMoyles committed Jul 2, 2024
1 parent 5d3d757 commit c2a9e87
Show file tree
Hide file tree
Showing 23 changed files with 476 additions and 253 deletions.
59 changes: 0 additions & 59 deletions genesyscloud/data_source_genesyscloud_routing_language.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"terraform-provider-genesyscloud/genesyscloud/architect_flow"
authRole "terraform-provider-genesyscloud/genesyscloud/auth_role"
"terraform-provider-genesyscloud/genesyscloud/provider"
routingLanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
userRoles "terraform-provider-genesyscloud/genesyscloud/user_roles"
"terraform-provider-genesyscloud/genesyscloud/util"
Expand Down Expand Up @@ -169,7 +170,7 @@ func TestAccDataSourceRecordingMediaRetentionPolicy(t *testing.T) {
gcloud.GenerateEvaluationFormResource(evaluationFormResource1, &evaluationFormResourceBody) +
gcloud.GenerateSurveyFormResource(surveyFormResource1, &surveyFormResourceBody) +
integration.GenerateIntegrationResource(integrationResource1, strconv.Quote(integrationIntendedState), strconv.Quote(integrationType), "") +
gcloud.GenerateRoutingLanguageResource(languageResource1, languageName) +
routingLanguage.GenerateRoutingLanguageResource(languageResource1, languageName) +
gcloud.GenerateRoutingWrapupcodeResource(wrapupCodeResource1, wrapupCodeName) +
architect_flow.GenerateFlowResource(
flowResource1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
integration "terraform-provider-genesyscloud/genesyscloud/integration"
"terraform-provider-genesyscloud/genesyscloud/provider"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
routingLanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
userRoles "terraform-provider-genesyscloud/genesyscloud/user_roles"

"testing"
Expand Down Expand Up @@ -52,7 +53,7 @@ func (r *registerTestInstance) registerTestResources() {
providerResources["genesyscloud_quality_forms_evaluation"] = gcloud.ResourceEvaluationForm()
providerResources["genesyscloud_quality_forms_survey"] = gcloud.ResourceSurveyForm()
providerResources["genesyscloud_integration"] = integration.ResourceIntegration()
providerResources["genesyscloud_routing_language"] = gcloud.ResourceRoutingLanguage()
providerResources["genesyscloud_routing_language"] = routingLanguage.ResourceRoutingLanguage()
providerResources["genesyscloud_routing_wrapupcode"] = gcloud.ResourceRoutingWrapupCode()
providerResources["genesyscloud_flow"] = flow.ResourceArchitectFlow()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"terraform-provider-genesyscloud/genesyscloud/architect_flow"
authRole "terraform-provider-genesyscloud/genesyscloud/auth_role"
"terraform-provider-genesyscloud/genesyscloud/provider"
routingLanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
userRoles "terraform-provider-genesyscloud/genesyscloud/user_roles"
"terraform-provider-genesyscloud/genesyscloud/util"
Expand Down Expand Up @@ -955,7 +956,7 @@ func TestAccResourceMediaRetentionPolicyBasic(t *testing.T) {
gcloud.GenerateEvaluationFormResource(evaluationFormResource1, &evaluationFormResourceBody) +
gcloud.GenerateSurveyFormResource(surveyFormResource1, &surveyFormResourceBody) +
integration.GenerateIntegrationResource(integrationResource1, strconv.Quote(integrationIntendedState), strconv.Quote(integrationType), "") +
gcloud.GenerateRoutingLanguageResource(languageResource1, languageName) +
routingLanguage.GenerateRoutingLanguageResource(languageResource1, languageName) +
gcloud.GenerateRoutingWrapupcodeResource(wrapupCodeResource1, wrapupCodeName) +
architect_flow.GenerateFlowResource(
flowResource1,
Expand Down Expand Up @@ -1062,7 +1063,7 @@ func TestAccResourceMediaRetentionPolicyBasic(t *testing.T) {
gcloud.GenerateEvaluationFormResource(evaluationFormResource1, &evaluationFormResourceBody) +
gcloud.GenerateSurveyFormResource(surveyFormResource1, &surveyFormResourceBody) +
integration.GenerateIntegrationResource(integrationResource1, strconv.Quote(integrationIntendedState), strconv.Quote(integrationType), "") +
gcloud.GenerateRoutingLanguageResource(languageResource1, languageName) +
routingLanguage.GenerateRoutingLanguageResource(languageResource1, languageName) +
gcloud.GenerateRoutingWrapupcodeResource(wrapupCodeResource1, wrapupCodeName) +
architect_flow.GenerateFlowResource(
flowResource1,
Expand Down Expand Up @@ -1169,7 +1170,7 @@ func TestAccResourceMediaRetentionPolicyBasic(t *testing.T) {
gcloud.GenerateEvaluationFormResource(evaluationFormResource1, &evaluationFormResourceBody) +
gcloud.GenerateSurveyFormResource(surveyFormResource1, &surveyFormResourceBody) +
integration.GenerateIntegrationResource(integrationResource1, strconv.Quote(integrationIntendedState), strconv.Quote(integrationType), "") +
gcloud.GenerateRoutingLanguageResource(languageResource1, languageName) +
routingLanguage.GenerateRoutingLanguageResource(languageResource1, languageName) +
gcloud.GenerateRoutingWrapupcodeResource(wrapupCodeResource1, wrapupCodeName) +
architect_flow.GenerateFlowResource(
flowResource1,
Expand Down Expand Up @@ -1276,7 +1277,7 @@ func TestAccResourceMediaRetentionPolicyBasic(t *testing.T) {
gcloud.GenerateEvaluationFormResource(evaluationFormResource1, &evaluationFormResourceBody) +
gcloud.GenerateSurveyFormResource(surveyFormResource1, &surveyFormResourceBody) +
integration.GenerateIntegrationResource(integrationResource1, strconv.Quote(integrationIntendedState), strconv.Quote(integrationType), "") +
gcloud.GenerateRoutingLanguageResource(languageResource1, languageName) +
routingLanguage.GenerateRoutingLanguageResource(languageResource1, languageName) +
gcloud.GenerateRoutingWrapupcodeResource(wrapupCodeResource1, wrapupCodeName) +
architect_flow.GenerateFlowResource(
flowResource1,
Expand Down
3 changes: 0 additions & 3 deletions genesyscloud/resource_genesyscloud_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func registerDataSources(l registrar.Registrar) {
l.RegisterDataSource("genesyscloud_organizations_me", DataSourceOrganizationsMe())
l.RegisterDataSource("genesyscloud_quality_forms_evaluation", DataSourceQualityFormsEvaluations())
l.RegisterDataSource("genesyscloud_quality_forms_survey", dataSourceQualityFormsSurvey())
l.RegisterDataSource("genesyscloud_routing_language", dataSourceRoutingLanguage())
l.RegisterDataSource("genesyscloud_routing_skill", dataSourceRoutingSkill())
l.RegisterDataSource("genesyscloud_routing_skill_group", dataSourceRoutingSkillGroup())
l.RegisterDataSource("genesyscloud_routing_email_domain", DataSourceRoutingEmailDomain())
Expand Down Expand Up @@ -58,7 +57,6 @@ func registerResources(l registrar.Registrar) {
l.RegisterResource("genesyscloud_quality_forms_evaluation", ResourceEvaluationForm())
l.RegisterResource("genesyscloud_quality_forms_survey", ResourceSurveyForm())
l.RegisterResource("genesyscloud_routing_email_domain", ResourceRoutingEmailDomain())
l.RegisterResource("genesyscloud_routing_language", ResourceRoutingLanguage())
l.RegisterResource("genesyscloud_routing_skill", ResourceRoutingSkill())
l.RegisterResource("genesyscloud_routing_skill_group", ResourceRoutingSkillGroup())
l.RegisterResource("genesyscloud_routing_wrapupcode", ResourceRoutingWrapupCode())
Expand All @@ -81,7 +79,6 @@ func registerExporters(l registrar.Registrar) {
l.RegisterExporter("genesyscloud_quality_forms_evaluation", EvaluationFormExporter())
l.RegisterExporter("genesyscloud_quality_forms_survey", SurveyFormExporter())
l.RegisterExporter("genesyscloud_routing_email_domain", RoutingEmailDomainExporter())
l.RegisterExporter("genesyscloud_routing_language", RoutingLanguageExporter())
l.RegisterExporter("genesyscloud_routing_skill", RoutingSkillExporter())
l.RegisterExporter("genesyscloud_routing_skill_group", ResourceSkillGroupExporter())
l.RegisterExporter("genesyscloud_routing_wrapupcode", RoutingWrapupCodeExporter())
Expand Down
5 changes: 3 additions & 2 deletions genesyscloud/resource_genesyscloud_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
architectSchedules "terraform-provider-genesyscloud/genesyscloud/architect_schedules"
"terraform-provider-genesyscloud/genesyscloud/group"
"terraform-provider-genesyscloud/genesyscloud/provider"
routinglanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
routingSettings "terraform-provider-genesyscloud/genesyscloud/routing_settings"
routingUtilization "terraform-provider-genesyscloud/genesyscloud/routing_utilization"
Expand Down Expand Up @@ -55,7 +56,7 @@ func (r *registerTestInstance) registerTestResources() {
providerResources["genesyscloud_quality_forms_evaluation"] = ResourceEvaluationForm()
providerResources["genesyscloud_quality_forms_survey"] = ResourceSurveyForm()
providerResources["genesyscloud_routing_email_domain"] = ResourceRoutingEmailDomain()
providerResources["genesyscloud_routing_language"] = ResourceRoutingLanguage()
providerResources["genesyscloud_routing_language"] = routinglanguage.ResourceRoutingLanguage()
providerResources["genesyscloud_routing_skill"] = ResourceRoutingSkill()
providerResources["genesyscloud_routing_skill_group"] = ResourceRoutingSkillGroup()
providerResources["genesyscloud_routing_settings"] = routingSettings.ResourceRoutingSettings()
Expand Down Expand Up @@ -93,7 +94,7 @@ func (r *registerTestInstance) registerTestDataSources() {
providerDataSources["genesyscloud_organizations_me"] = DataSourceOrganizationsMe()
providerDataSources["genesyscloud_quality_forms_evaluation"] = DataSourceQualityFormsEvaluations()
providerDataSources["genesyscloud_quality_forms_survey"] = dataSourceQualityFormsSurvey()
providerDataSources["genesyscloud_routing_language"] = dataSourceRoutingLanguage()
providerDataSources["genesyscloud_routing_language"] = routinglanguage.DataSourceRoutingLanguage()
providerDataSources["genesyscloud_routing_skill"] = dataSourceRoutingSkill()
providerDataSources["genesyscloud_routing_skill_group"] = dataSourceRoutingSkillGroup()
providerDataSources["genesyscloud_routing_email_domain"] = DataSourceRoutingEmailDomain()
Expand Down
164 changes: 0 additions & 164 deletions genesyscloud/resource_genesyscloud_routing_language.go

This file was deleted.

9 changes: 5 additions & 4 deletions genesyscloud/resource_genesyscloud_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strconv"
"strings"
"terraform-provider-genesyscloud/genesyscloud/provider"
routinglanguage "terraform-provider-genesyscloud/genesyscloud/routing_language"
routingUtilization "terraform-provider-genesyscloud/genesyscloud/routing_utilization"
routingUtilizationLabel "terraform-provider-genesyscloud/genesyscloud/routing_utilization_label"
"terraform-provider-genesyscloud/genesyscloud/util"
Expand Down Expand Up @@ -486,7 +487,7 @@ func TestAccResourceUserLanguages(t *testing.T) {
email1,
userName1,
generateUserRoutingLang("genesyscloud_routing_language."+langResource1+".id", proficiency1),
) + GenerateRoutingLanguageResource(langResource1, langName1),
) + routinglanguage.GenerateRoutingLanguageResource(langResource1, langName1),
Check: resource.ComposeTestCheckFunc(
validateUserLanguage("genesyscloud_user."+userResource1, "genesyscloud_routing_language."+langResource1, proficiency1),
),
Expand All @@ -499,10 +500,10 @@ func TestAccResourceUserLanguages(t *testing.T) {
userName1,
generateUserRoutingLang("genesyscloud_routing_language."+langResource1+".id", proficiency1),
generateUserRoutingLang("genesyscloud_routing_language."+langResource2+".id", proficiency2),
) + GenerateRoutingLanguageResource(
) + routinglanguage.GenerateRoutingLanguageResource(
langResource1,
langName1,
) + GenerateRoutingLanguageResource(
) + routinglanguage.GenerateRoutingLanguageResource(
langResource2,
langName2,
),
Expand All @@ -518,7 +519,7 @@ func TestAccResourceUserLanguages(t *testing.T) {
email1,
userName1,
generateUserRoutingLang("genesyscloud_routing_language."+langResource2+".id", proficiency1),
) + GenerateRoutingLanguageResource(
) + routinglanguage.GenerateRoutingLanguageResource(
langResource2,
langName2,
),
Expand Down
Loading

0 comments on commit c2a9e87

Please sign in to comment.