-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devtooling 485 fix group delete v2 (#927)
* DEVTOOLING-485: Refactored group into package and then fixed bug * DEVTOOLING-485: Added caching * DEVTOOLING-485: Added caching * DEVTOOLING-485: Fixing the group delete
- Loading branch information
1 parent
fd5620c
commit 067a152
Showing
30 changed files
with
1,220 additions
and
760 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
examples/resources/genesyscloud_flow/inboundcall_flow_example.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 17 additions & 24 deletions
41
examples/resources/genesyscloud_flow/inboundcall_flow_example2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
inboundEmail: | ||
name: Terraform Flow Test-4598b11f-bbf0-4533-96bc-cc271ac1d5a3 | ||
division: New Home | ||
startUpRef: "/inboundEmail/states/state[Initial State_10]" | ||
defaultLanguage: en-us | ||
supportedLanguages: | ||
en-us: | ||
defaultLanguageSkill: | ||
noValue: true | ||
settingsInboundEmailHandling: | ||
emailHandling: | ||
disconnect: | ||
none: true | ||
settingsErrorHandling: | ||
errorHandling: | ||
disconnect: | ||
none: true | ||
states: | ||
- state: | ||
name: Initial State | ||
refId: Initial State_10 | ||
actions: | ||
- disconnect: | ||
name: Disconnect | ||
inboundCall: | ||
name: Terraform Flow Test-e74202b4-a83b-4247-a7d1-b1e94e752344 | ||
description: test description 2 | ||
defaultLanguage: en-us | ||
startUpRef: ./menus/menu[mainMenu] | ||
initialGreeting: | ||
tts: Archy says hi!!!!! | ||
menus: | ||
- menu: | ||
name: Main Menu | ||
audio: | ||
tts: You are at the Main Menu, press 9 to disconnect. | ||
refId: mainMenu | ||
choices: | ||
- menuDisconnect: | ||
name: Disconnect | ||
dtmf: digit_9 |
40 changes: 24 additions & 16 deletions
40
examples/resources/genesyscloud_flow/inboundcall_flow_example3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
inboundCall: | ||
name: Terraform Flow Test-09cb1249-e934-4fb7-b35b-a96940f494c7 | ||
defaultLanguage: en-us | ||
startUpRef: ./menus/menu[mainMenu] | ||
initialGreeting: | ||
tts: Archy says hi!!!!! | ||
menus: | ||
- menu: | ||
name: Main Menu | ||
audio: | ||
tts: You are at the Main Menu, press 9 to disconnect. | ||
refId: mainMenu | ||
choices: | ||
- menuDisconnect: | ||
name: Disconnect | ||
dtmf: digit_9 | ||
inboundEmail: | ||
name: Terraform Flow Test-e74202b4-a83b-4247-a7d1-b1e94e752344 | ||
description: test description 1 | ||
startUpRef: "/inboundEmail/states/state[Initial State_10]" | ||
defaultLanguage: en-us | ||
supportedLanguages: | ||
en-us: | ||
defaultLanguageSkill: | ||
noValue: true | ||
settingsInboundEmailHandling: | ||
emailHandling: | ||
disconnect: | ||
none: true | ||
settingsErrorHandling: | ||
errorHandling: | ||
disconnect: | ||
none: true | ||
states: | ||
- state: | ||
name: Initial State | ||
refId: Initial State_10 | ||
actions: | ||
- disconnect: | ||
name: Disconnect |
2 changes: 1 addition & 1 deletion
2
examples/resources/genesyscloud_processautomation_trigger/trigger_workflow_example.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package group | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||
"sync" | ||
"terraform-provider-genesyscloud/genesyscloud" | ||
"testing" | ||
) | ||
|
||
var providerDataSources map[string]*schema.Resource | ||
|
||
// providerResources holds a map of all registered resources | ||
var providerResources map[string]*schema.Resource | ||
|
||
type registerTestInstance struct { | ||
resourceMapMutex sync.RWMutex | ||
datasourceMapMutex sync.RWMutex | ||
} | ||
|
||
// registerTestResources registers all resources used in the tests | ||
func (r *registerTestInstance) registerTestResources() { | ||
r.resourceMapMutex.Lock() | ||
defer r.resourceMapMutex.Unlock() | ||
|
||
providerResources[resourceName] = ResourceGroup() | ||
providerResources["genesyscloud_user"] = genesyscloud.ResourceUser() | ||
|
||
} | ||
|
||
// registerTestDataSources registers all data sources used in the tests. | ||
func (r *registerTestInstance) registerTestDataSources() { | ||
r.datasourceMapMutex.Lock() | ||
defer r.datasourceMapMutex.Unlock() | ||
|
||
providerDataSources[resourceName] = DataSourceGroup() | ||
} | ||
|
||
// initTestResources initializes all test resources and data sources. | ||
func initTestResources() { | ||
providerDataSources = make(map[string]*schema.Resource) | ||
providerResources = make(map[string]*schema.Resource) | ||
|
||
regInstance := ®isterTestInstance{} | ||
|
||
regInstance.registerTestResources() | ||
regInstance.registerTestDataSources() | ||
} | ||
|
||
// TestMain is a "setup" function called by the testing framework when run the test | ||
func TestMain(m *testing.M) { | ||
// Run setup function before starting the test suite for the flow_outcome package | ||
initTestResources() | ||
|
||
// Run the test suite for the flow_outcome package | ||
m.Run() | ||
} |
Oops, something went wrong.