@@ -196,6 +196,7 @@ func TestStreams(t *testing.T) {
196
196
})
197
197
198
198
// Endpoints
199
+ var endpointID string
199
200
t .Run ("Creating a streams privateLink endpoint" , func (t * testing.T ) {
200
201
streamsCmd := exec .Command (cliPath ,
201
202
"streams" ,
@@ -216,10 +217,39 @@ func TestStreams(t *testing.T) {
216
217
req .NoError (json .Unmarshal (streamsResp , & privateLinkEndpoint ))
217
218
218
219
a := assert .New (t )
219
- a .Equal ("Azure" , * privateLinkEndpoint .Provider )
220
- a .Equal ("US_EAST_2" , * privateLinkEndpoint .Region )
221
- a .Equal ("/subscriptions/fd01adff-b37e-4693-8497-83ecf183a145/resourceGroups/test-rg/providers/Microsoft.EventHub/namespaces/test-namespace" , * privateLinkEndpoint .ServiceEndpointId )
222
- a .Equal ("test-namespace.servicebus.windows.net" , * privateLinkEndpoint .DnsDomain )
220
+ a .Equal ("Azure" , privateLinkEndpoint .GetProvider ())
221
+ a .Equal ("US_EAST_2" , privateLinkEndpoint .GetRegion ())
222
+ a .Equal ("/subscriptions/fd01adff-b37e-4693-8497-83ecf183a145/resourceGroups/test-rg/providers/Microsoft.EventHub/namespaces/test-namespace" , privateLinkEndpoint .GetServiceEndpointId ())
223
+ a .Equal ("test-namespace.servicebus.windows.net" , privateLinkEndpoint .GetDnsDomain ())
224
+
225
+ // Assign the endpoint ID so that it can be used in subsequent tests
226
+ endpointID = privateLinkEndpoint .GetId ()
227
+ })
228
+
229
+ t .Run ("Describing a streams privateLink endpoint" , func (t * testing.T ) {
230
+ streamsCmd := exec .Command (cliPath ,
231
+ "streams" ,
232
+ "privateLink" ,
233
+ "describe" ,
234
+ endpointID ,
235
+ "-o=json" ,
236
+ "--projectId" ,
237
+ g .projectID ,
238
+ )
239
+
240
+ streamsCmd .Env = os .Environ ()
241
+ streamsResp , err := e2e .RunAndGetStdOut (streamsCmd )
242
+ req .NoError (err , string (streamsResp ))
243
+
244
+ var privateLinkEndpoint atlasv2.StreamsPrivateLinkConnection
245
+ req .NoError (json .Unmarshal (streamsResp , & privateLinkEndpoint ))
246
+
247
+ a := assert .New (t )
248
+ a .Equal (endpointID , privateLinkEndpoint .GetId ())
249
+ a .Equal ("Azure" , privateLinkEndpoint .GetProvider ())
250
+ a .Equal ("US_EAST_2" , privateLinkEndpoint .GetRegion ())
251
+ a .Equal ("/subscriptions/fd01adff-b37e-4693-8497-83ecf183a145/resourceGroups/test-rg/providers/Microsoft.EventHub/namespaces/test-namespace" , privateLinkEndpoint .GetServiceEndpointId ())
252
+ a .Equal ("test-namespace.servicebus.windows.net" , privateLinkEndpoint .GetDnsDomain ())
223
253
})
224
254
225
255
// Connections
0 commit comments