Merge pull request #16964 from influxdata/fix/import-experimental

fix(notification/rule): import experimental package for pagerduty rule
pull/16912/head
Michael Desa 2020-02-21 11:13:02 -08:00 committed by GitHub
commit 058ccc25cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,7 @@ func (s *PagerDuty) GenerateFlux(e influxdb.NotificationEndpoint) (string, error
func (s *PagerDuty) GenerateFluxAST(e *endpoint.PagerDuty) (*ast.Package, error) {
f := flux.File(
s.Name,
flux.Imports("influxdata/influxdb/monitor", "pagerduty", "influxdata/influxdb/secrets"),
flux.Imports("influxdata/influxdb/monitor", "pagerduty", "influxdata/influxdb/secrets", "experimental"),
s.generateFluxASTBody(e),
)
return &ast.Package{Package: "main", Files: []*ast.File{f}}, nil

View File

@ -64,6 +64,7 @@ func TestPagerDuty_GenerateFlux(t *testing.T) {
import "influxdata/influxdb/monitor"
import "pagerduty"
import "influxdata/influxdb/secrets"
import "experimental"
option task = {name: "foo", every: 1h}
@ -147,6 +148,7 @@ all_statuses
import "influxdata/influxdb/monitor"
import "pagerduty"
import "influxdata/influxdb/secrets"
import "experimental"
option task = {name: "foo", every: 1h}
@ -232,6 +234,7 @@ all_statuses
import "influxdata/influxdb/monitor"
import "pagerduty"
import "influxdata/influxdb/secrets"
import "experimental"
option task = {name: "foo", every: 1h}