@@ -17,7 +17,7 @@ import (
17
17
)
18
18
19
19
func TestAccTFETeamNotificationConfiguration_basic (t * testing.T ) {
20
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
20
+ notificationConfiguration := & tfe.NotificationConfiguration {}
21
21
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
22
22
23
23
resource .Test (t , resource.TestCase {
@@ -48,7 +48,7 @@ func TestAccTFETeamNotificationConfiguration_basic(t *testing.T) {
48
48
}
49
49
50
50
func TestAccTFETeamNotificationConfiguration_emailUserIDs (t * testing.T ) {
51
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
51
+ notificationConfiguration := & tfe.NotificationConfiguration {}
52
52
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
53
53
54
54
resource .Test (t , resource.TestCase {
@@ -79,7 +79,7 @@ func TestAccTFETeamNotificationConfiguration_emailUserIDs(t *testing.T) {
79
79
}
80
80
81
81
func TestAccTFETeamNotificationConfiguration_update (t * testing.T ) {
82
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
82
+ notificationConfiguration := & tfe.NotificationConfiguration {}
83
83
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
84
84
85
85
resource .Test (t , resource.TestCase {
@@ -132,7 +132,7 @@ func TestAccTFETeamNotificationConfiguration_update(t *testing.T) {
132
132
}
133
133
134
134
func TestAccTFETeamNotificationConfiguration_updateEmailUserIDs (t * testing.T ) {
135
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
135
+ notificationConfiguration := & tfe.NotificationConfiguration {}
136
136
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
137
137
138
138
resource .Test (t , resource.TestCase {
@@ -294,7 +294,7 @@ func TestAccTFETeamNotificationConfiguration_validateSchemaAttributesBadDestinat
294
294
}
295
295
296
296
func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesEmail (t * testing.T ) {
297
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
297
+ notificationConfiguration := & tfe.NotificationConfiguration {}
298
298
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
299
299
300
300
resource .Test (t , resource.TestCase {
@@ -336,7 +336,7 @@ func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesEmail
336
336
}
337
337
338
338
func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesGeneric (t * testing.T ) {
339
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
339
+ notificationConfiguration := & tfe.NotificationConfiguration {}
340
340
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
341
341
342
342
resource .Test (t , resource.TestCase {
@@ -382,7 +382,7 @@ func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesGener
382
382
}
383
383
384
384
func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesSlack (t * testing.T ) {
385
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
385
+ notificationConfiguration := & tfe.NotificationConfiguration {}
386
386
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
387
387
388
388
resource .Test (t , resource.TestCase {
@@ -432,7 +432,7 @@ func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesSlack
432
432
}
433
433
434
434
func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesMicrosoftTeams (t * testing.T ) {
435
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
435
+ notificationConfiguration := & tfe.NotificationConfiguration {}
436
436
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
437
437
438
438
resource .Test (t , resource.TestCase {
@@ -478,7 +478,7 @@ func TestAccTFETeamNotificationConfiguration_updateValidateSchemaAttributesMicro
478
478
}
479
479
480
480
func TestAccTFETeamNotificationConfiguration_duplicateTriggers (t * testing.T ) {
481
- notificationConfiguration := & tfe.TeamNotificationConfiguration {}
481
+ notificationConfiguration := & tfe.NotificationConfiguration {}
482
482
rInt := rand .New (rand .NewSource (time .Now ().UnixNano ())).Int ()
483
483
484
484
resource .Test (t , resource.TestCase {
@@ -574,7 +574,7 @@ func TestAccTFETeamNotificationConfigurationImport_emptyEmailUserIDs(t *testing.
574
574
})
575
575
}
576
576
577
- func testAccCheckTFETeamNotificationConfigurationExists (n string , notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
577
+ func testAccCheckTFETeamNotificationConfigurationExists (n string , notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
578
578
return func (s * terraform.State ) error {
579
579
config := testAccProvider .Meta ().(ConfiguredClient )
580
580
@@ -587,7 +587,7 @@ func testAccCheckTFETeamNotificationConfigurationExists(n string, notificationCo
587
587
return fmt .Errorf ("No instance ID is set" )
588
588
}
589
589
590
- nc , err := config .Client .TeamNotificationConfigurations .Read (ctx , rs .Primary .ID )
590
+ nc , err := config .Client .NotificationConfigurations .Read (ctx , rs .Primary .ID )
591
591
if err != nil {
592
592
return err
593
593
}
@@ -598,7 +598,7 @@ func testAccCheckTFETeamNotificationConfigurationExists(n string, notificationCo
598
598
}
599
599
}
600
600
601
- func testAccCheckTFETeamNotificationConfigurationAttributes (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
601
+ func testAccCheckTFETeamNotificationConfigurationAttributes (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
602
602
return func (s * terraform.State ) error {
603
603
if notificationConfiguration .Name != "notification_basic" {
604
604
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -626,7 +626,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributes(notificationConfigur
626
626
}
627
627
}
628
628
629
- func testAccCheckTFETeamNotificationConfigurationAttributesUpdate (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
629
+ func testAccCheckTFETeamNotificationConfigurationAttributesUpdate (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
630
630
return func (s * terraform.State ) error {
631
631
if notificationConfiguration .Name != "notification_update" {
632
632
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -654,7 +654,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributesUpdate(notificationCo
654
654
}
655
655
}
656
656
657
- func testAccCheckTFETeamNotificationConfigurationAttributesEmailUserIDs (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
657
+ func testAccCheckTFETeamNotificationConfigurationAttributesEmailUserIDs (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
658
658
return func (s * terraform.State ) error {
659
659
if notificationConfiguration .Name != "notification_email" {
660
660
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -682,7 +682,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributesEmailUserIDs(notifica
682
682
}
683
683
}
684
684
685
- func testAccCheckTFETeamNotificationConfigurationAttributesUpdateEmailUserIDs (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
685
+ func testAccCheckTFETeamNotificationConfigurationAttributesUpdateEmailUserIDs (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
686
686
return func (s * terraform.State ) error {
687
687
if notificationConfiguration .Name != "notification_email_update" {
688
688
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -710,7 +710,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributesUpdateEmailUserIDs(no
710
710
}
711
711
}
712
712
713
- func testAccCheckTFETeamNotificationConfigurationAttributesSlack (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
713
+ func testAccCheckTFETeamNotificationConfigurationAttributesSlack (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
714
714
return func (s * terraform.State ) error {
715
715
if notificationConfiguration .Name != "notification_slack" {
716
716
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -734,7 +734,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributesSlack(notificationCon
734
734
}
735
735
}
736
736
737
- func testAccCheckTFETeamNotificationConfigurationAttributesMicrosoftTeams (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
737
+ func testAccCheckTFETeamNotificationConfigurationAttributesMicrosoftTeams (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
738
738
return func (s * terraform.State ) error {
739
739
if notificationConfiguration .Name != "notification_msteams" {
740
740
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -760,7 +760,7 @@ func testAccCheckTFETeamNotificationConfigurationAttributesMicrosoftTeams(notifi
760
760
}
761
761
}
762
762
763
- func testAccCheckTFETeamNotificationConfigurationAttributesDuplicateTriggers (notificationConfiguration * tfe.TeamNotificationConfiguration ) resource.TestCheckFunc {
763
+ func testAccCheckTFETeamNotificationConfigurationAttributesDuplicateTriggers (notificationConfiguration * tfe.NotificationConfiguration ) resource.TestCheckFunc {
764
764
return func (s * terraform.State ) error {
765
765
if notificationConfiguration .Name != "notification_duplicate_triggers" {
766
766
return fmt .Errorf ("Bad name: %s" , notificationConfiguration .Name )
@@ -800,7 +800,7 @@ func testAccCheckTFETeamNotificationConfigurationDestroy(s *terraform.State) err
800
800
return fmt .Errorf ("No instance ID is set" )
801
801
}
802
802
803
- _ , err := config .Client .TeamNotificationConfigurations .Read (ctx , rs .Primary .ID )
803
+ _ , err := config .Client .NotificationConfigurations .Read (ctx , rs .Primary .ID )
804
804
if err == nil {
805
805
return fmt .Errorf ("Notification configuration %s still exists" , rs .Primary .ID )
806
806
}
0 commit comments