@@ -26,6 +26,13 @@ func TestAccStreamPrivatelinkEndpoint_basic(t *testing.T) {
26
26
resource .Test (t , * tc )
27
27
}
28
28
29
+ func TestAccStreamPrivateLinkEndpoint_noDNSSubdomains (t * testing.T ) {
30
+ acc .SkipTestForCI (t ) // needs confluent cloud resources
31
+ tc := noDNSSubDomainsTestCase (t )
32
+ // Tests include testing of plural data source and so cannot be run in parallel
33
+ resource .Test (t , * tc )
34
+ }
35
+
29
36
func TestAccStreamPrivatelinkEndpoint_failedUpdate (t * testing.T ) {
30
37
acc .SkipTestForCI (t ) // needs confluent cloud resources
31
38
tc := failedUpdateTestCase (t )
@@ -53,6 +60,40 @@ func basicTestCase(t *testing.T) *resource.TestCase {
53
60
config = acc .GetCompleteConfluentConfig (true , true , projectID , provider , region , vendor , awsAccountID , networkID , privatelinkAccessID )
54
61
)
55
62
63
+ return & resource.TestCase {
64
+ PreCheck : func () { acc .PreCheckBasic (t ); acc .PreCheckConfluentAWSPrivatelink (t ) },
65
+ CheckDestroy : checkDestroy ,
66
+ ExternalProviders : acc .ExternalProvidersOnlyConfluent (),
67
+ ProtoV6ProviderFactories : acc .TestAccProviderV6Factories ,
68
+ Steps : []resource.TestStep {
69
+ {
70
+
71
+ Config : config ,
72
+ Check : checksStreamPrivatelinkEndpoint (projectID , provider , region , vendor , true ),
73
+ },
74
+ {
75
+ ResourceName : resourceName ,
76
+ ImportStateIdFunc : importStateIDFunc (resourceName ),
77
+ ImportState : true ,
78
+ ImportStateVerify : true ,
79
+ },
80
+ },
81
+ }
82
+ }
83
+
84
+ func noDNSSubDomainsTestCase (t * testing.T ) * resource.TestCase {
85
+ t .Helper ()
86
+
87
+ var (
88
+ projectID = acc .ProjectIDExecution (t )
89
+ provider = "AWS"
90
+ region = "us-east-1"
91
+ awsAccountID = os .Getenv ("AWS_ACCOUNT_ID" )
92
+ networkID = os .Getenv ("CONFLUENT_CLOUD_NETWORK_ID" )
93
+ privatelinkAccessID = os .Getenv ("CONFLUENT_CLOUD_PRIVATELINK_ACCESS_ID" )
94
+ config = acc .GetCompleteConfluentConfig (true , false , projectID , provider , region , vendor , awsAccountID , networkID , privatelinkAccessID )
95
+ )
96
+
56
97
return & resource.TestCase {
57
98
PreCheck : func () { acc .PreCheckBasic (t ); acc .PreCheckConfluentAWSPrivatelink (t ) },
58
99
CheckDestroy : checkDestroy ,
0 commit comments