Skip to content

Commit 9669ea8

Browse files
coderGo93Edgar López
andauthored
INTMDB-175: Added azure status in endpoint service (#179)
* fix: added azure status * test: added azure status in one test Co-authored-by: Edgar López <edgarlopez@pop-os.localdomain>
1 parent b507e8b commit 9669ea8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

mongodbatlas/private_endpoints.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ type InterfaceEndpointConnection struct {
7171
PrivateEndpointResourceID string `json:"privateEndpointResourceId,omitempty"` // Unique identifier of the private endpoint.
7272
DeleteRequested *bool `json:"deleteRequested,omitempty"` // Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection.
7373
ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the interface endpoint. Returns null if there are no errors.
74-
ConnectionStatus string `json:"connectionStatus,omitempty"` // Status of the interface endpoint: NONE, PENDING_ACCEPTANCE, PENDING, AVAILABLE, REJECTED, DELETING.
74+
AWSConnectionStatus string `json:"connectionStatus,omitempty"` // Status of the interface endpoint: NONE, PENDING_ACCEPTANCE, PENDING, AVAILABLE, REJECTED, DELETING.
75+
AzureStatus string `json:"status,omitempty"` // Status of the interface endpoint AZURE: INITIATING, AVAILABLE, FAILED, DELETING.
7576
}
7677

7778
// RegionalizedPrivateEndpointSetting represents MongoDB Regionalized private Endpoint Setting.

mongodbatlas/private_endpoints_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func TestPrivateEndpoint_AddOneInterfaceEndpointAWS(t *testing.T) {
389389

390390
expected := &InterfaceEndpointConnection{
391391
InterfaceEndpointID: "vpce-08fb7e9319909ec7b",
392-
ConnectionStatus: "PENDING",
392+
AWSConnectionStatus: "PENDING",
393393
DeleteRequested: pointy.Bool(false),
394394
}
395395

@@ -443,7 +443,7 @@ func TestPrivateEndpoint_AddOneInterfaceEndpoint(t *testing.T) {
443443
expected := &InterfaceEndpointConnection{
444444
PrivateEndpointIPAddress: "10.0.0.4",
445445
PrivateEndpointResourceID: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/privatelink/providers/Microsoft.Network/privateEndpoints/test",
446-
ConnectionStatus: "INITIATING",
446+
AWSConnectionStatus: "INITIATING",
447447
DeleteRequested: pointy.Bool(false),
448448
}
449449

@@ -476,7 +476,7 @@ func TestPrivateEndpoints_GetOneInterfaceEndpointAWS(t *testing.T) {
476476

477477
expected := &InterfaceEndpointConnection{
478478
InterfaceEndpointID: "vpce-08fb7e9319909ec7b",
479-
ConnectionStatus: "PENDING",
479+
AWSConnectionStatus: "PENDING",
480480
DeleteRequested: pointy.Bool(false),
481481
}
482482

@@ -500,7 +500,7 @@ func TestPrivateEndpoints_GetOneInterfaceEndpointAzure(t *testing.T) {
500500
fmt.Fprint(w, `{
501501
"privateEndpointResourceId": "/subscriptions/19265c27-b60e-4c3b-9426-ae3f507300b5/resourceGroups/test/providers/Microsoft.Network/privateEndpoints/test",
502502
"privateEndpointIPAddress": "10.0.0.4",
503-
"connectionStatus": "INITIATING",
503+
"status": "INITIATING",
504504
"deleteRequested": false
505505
}`)
506506
})
@@ -513,7 +513,7 @@ func TestPrivateEndpoints_GetOneInterfaceEndpointAzure(t *testing.T) {
513513
expected := &InterfaceEndpointConnection{
514514
PrivateEndpointIPAddress: "10.0.0.4",
515515
PrivateEndpointResourceID: interfaceEndpointID,
516-
ConnectionStatus: "INITIATING",
516+
AzureStatus: "INITIATING",
517517
DeleteRequested: pointy.Bool(false),
518518
}
519519

0 commit comments

Comments
 (0)