@@ -55,10 +55,6 @@ func TestBuildCreatePrivateLinkRequest_HappyPath(t *testing.T) {
5555 assert .Equal (t , "com.amazonaws.vpce.us-east-1.vpce-svc-abc123" , req .Endpoint )
5656}
5757
58- func TestPrivateLinkServiceDNS (t * testing.T ) {
59- assert .Equal (t , "orders-db-prj_123.plg.svc" , privateLinkServiceDNS ("orders-db" , "prj_123" ))
60- }
61-
6258func TestBuildPrivateLinkListRows_EmptyList (t * testing.T ) {
6359 rows := buildPrivateLinkListRows ([]* lkproto.PrivateLink {}, map [string ]* lkproto.PrivateLinkStatus {}, map [string ]error {})
6460 assert .Empty (t , rows )
@@ -71,6 +67,7 @@ func TestBuildPrivateLinkListRows_OnePrivateLink(t *testing.T) {
7167 Name : "orders-db" ,
7268 Region : "us-east-1" ,
7369 Port : 6379 ,
70+ Endpoint : "orders-db-p123.link" ,
7471 },
7572 }
7673
@@ -88,7 +85,8 @@ func TestBuildPrivateLinkListRows_OnePrivateLink(t *testing.T) {
8885 assert .Equal (t , "orders-db" , rows [0 ][1 ])
8986 assert .Equal (t , "us-east-1" , rows [0 ][2 ])
9087 assert .Equal (t , "6379" , rows [0 ][3 ])
91- assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [0 ][4 ])
88+ assert .Equal (t , "orders-db-p123.link" , rows [0 ][4 ])
89+ assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [0 ][5 ])
9290}
9391
9492func TestBuildPrivateLinkListRows_TwoPrivateLinksDifferentRegions (t * testing.T ) {
@@ -98,12 +96,14 @@ func TestBuildPrivateLinkListRows_TwoPrivateLinksDifferentRegions(t *testing.T)
9896 Name : "orders-db" ,
9997 Region : "us-east-1" ,
10098 Port : 6379 ,
99+ Endpoint : "orders-db-p123.link" ,
101100 },
102101 {
103102 PrivateLinkId : "pl-2" ,
104103 Name : "cache" ,
105104 Region : "eu-west-1" ,
106105 Port : 6380 ,
106+ Endpoint : "cache-p123.link" ,
107107 },
108108 }
109109
@@ -121,6 +121,8 @@ func TestBuildPrivateLinkListRows_TwoPrivateLinksDifferentRegions(t *testing.T)
121121
122122 assert .Equal (t , "us-east-1" , rows [0 ][2 ])
123123 assert .Equal (t , "eu-west-1" , rows [1 ][2 ])
124- assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [0 ][4 ])
125- assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [1 ][4 ])
124+ assert .Equal (t , "orders-db-p123.link" , rows [0 ][4 ])
125+ assert .Equal (t , "cache-p123.link" , rows [1 ][4 ])
126+ assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [0 ][5 ])
127+ assert .Equal (t , lkproto .PrivateLinkStatus_PRIVATE_LINK_STATUS_AVAILABLE .String (), rows [1 ][5 ])
126128}
0 commit comments