Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(workflows): added new notification trigger type called investigation #2798

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions newrelic/resource_newrelic_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@ import (
"github.com/newrelic/newrelic-client-go/v2/pkg/ai"
)

func TestNewRelicWorkflow_WithInvestigatingNotificationTriggers(t *testing.T) {
resourceName := "newrelic_workflow.foo"
rName := generateNameForIntegrationTestResource()

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheckEnvVars(t) },
Providers: testAccProviders,
CheckDestroy: testAccNewRelicWorkflowDestroy,
Steps: []resource.TestStep{
// Test: Create workflow
{
Config: testAccNewRelicWorkflowConfigurationWithNotificationTriggers(testAccountID, rName, `["ACTIVATED", "INVESTIGATING"]`),
Check: resource.ComposeTestCheckFunc(
testAccCheckNewRelicWorkflowExists(resourceName),
),
},
// Test: Update workflow
{
Config: testAccNewRelicWorkflowConfigurationWithNotificationTriggers(testAccountID, fmt.Sprintf("%s-updated", rName), `["ACTIVATED", "INVESTIGATING", "CLOSED"]`),
Check: resource.ComposeTestCheckFunc(
testAccCheckNewRelicWorkflowExists(resourceName),
),
},
},
})
}

func TestNewRelicWorkflow_Webhook(t *testing.T) {
resourceName := "newrelic_workflow.foo"
rName := generateNameForIntegrationTestResource()
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/workflow.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ One could, for example, configure a workflow to open a Jira ticket and send Slac
Possible values:
* `ACTIVATED` - Send a notification when an issue is activated
* `ACKNOWLEDGED` - Send a notification when an issue is acknowledged
* `INVESTIGATING` - Send a notification when an issue is being investigated
* `PRIORITY_CHANGED` - Send a notification when an issue's priority has been changed
* `CLOSED` - Send a notification when an issue is closed
* `OTHER_UPDATES` - Send a notification on other updates on the issue. These updates include:
Expand Down