@@ -421,8 +421,6 @@ func TestGetActiveActivePrivateLink(t *testing.T) {
421421}
422422
423423func TestGetPrivateLinkScript (t * testing.T ) {
424- t .Skipf ("skipping test until privatelink script is available" )
425-
426424 tc := []struct {
427425 description string
428426 mockedResponse []endpointRequest
@@ -436,10 +434,51 @@ func TestGetPrivateLinkScript(t *testing.T) {
436434 getRequest (
437435 t ,
438436 "/subscriptions/114019/private-link/endpoint-script?includeTerraformAwsScript=true" ,
439- `a pro privatelink aws terraform endpoint script` ,
437+ `{
438+ "taskId": "4e62bd68-06ce-4207-91cd-62b9d8b60dff",
439+ "commandType": "privateLinkEndpointScriptGetRequest",
440+ "status": "received",
441+ "description": "Task request received and is being queued for processing.",
442+ "timestamp": "2025-10-30T14:13:46.539111211Z",
443+ "links": [
444+ {
445+ "type": "GET",
446+ "href": "https://api-staging.qa.redislabs.com/v1/tasks/4e62bd68-06ce-4207-91cd-62b9d8b60dff",
447+ "rel": "task"
448+ }
449+ ]
450+ }` ,
440451 ),
452+ getRequest (
453+ t ,
454+ "/tasks/4e62bd68-06ce-4207-91cd-62b9d8b60dff" ,
455+ `{
456+ "taskId": "4e62bd68-06ce-4207-91cd-62b9d8b60dff",
457+ "commandType": "privateLinkEndpointScriptGetRequest",
458+ "status": "processing-completed",
459+ "description": "Request processing completed successfully and its resources are now being provisioned / de-provisioned.",
460+ "timestamp": "2025-10-30T14:13:51.991415541Z",
461+ "response": {
462+ "resourceId": 114019,
463+ "resource": {
464+ "resourceEndpointScript": "python script content here",
465+ "terraformAwsScript": "terraform script content here"
466+ }
467+ },
468+ "links": [
469+ {
470+ "type": "GET",
471+ "href": "https://api-staging.qa.redislabs.com/v1/tasks/4e62bd68-06ce-4207-91cd-62b9d8b60dff",
472+ "rel": "self"
473+ }
474+ ]
475+ }` ,
476+ ),
477+ },
478+ expectedResult : & pl.PrivateLinkEndpointScript {
479+ ResourceEndpointScript : redis .String ("python script content here" ),
480+ TerraformAwsScript : redis .String ("terraform script content here" ),
441481 },
442- expectedResult : redis .String ("a pro privatelink aws terraform endpoint script" ),
443482 },
444483 }
445484 for _ , testCase := range tc {
@@ -464,8 +503,6 @@ func TestGetPrivateLinkScript(t *testing.T) {
464503}
465504
466505func TestGetActiveActivePrivateLinkScript (t * testing.T ) {
467- t .Skipf ("skipping test until privatelink script is available" )
468-
469506 tc := []struct {
470507 description string
471508 mockedResponse []endpointRequest
@@ -479,10 +516,51 @@ func TestGetActiveActivePrivateLinkScript(t *testing.T) {
479516 getRequest (
480517 t ,
481518 "/subscriptions/114019/regions/1/private-link/endpoint-script?includeTerraformAwsScript=true" ,
482- `an active active aws terraform endpoint script` ,
519+ `{
520+ "taskId": "5f73ce79-17df-5db1-a2de-18993ea71f00",
521+ "commandType": "activeActivePrivateLinkEndpointScriptGetRequest",
522+ "status": "received",
523+ "description": "Task request received and is being queued for processing.",
524+ "timestamp": "2025-10-30T14:13:46.539111211Z",
525+ "links": [
526+ {
527+ "type": "GET",
528+ "href": "https://api-staging.qa.redislabs.com/v1/tasks/5f73ce79-17df-5db1-a2de-18993ea71f00",
529+ "rel": "task"
530+ }
531+ ]
532+ }` ,
483533 ),
534+ getRequest (
535+ t ,
536+ "/tasks/5f73ce79-17df-5db1-a2de-18993ea71f00" ,
537+ `{
538+ "taskId": "5f73ce79-17df-5db1-a2de-18993ea71f00",
539+ "commandType": "activeActivePrivateLinkEndpointScriptGetRequest",
540+ "status": "processing-completed",
541+ "description": "Request processing completed successfully and its resources are now being provisioned / de-provisioned.",
542+ "timestamp": "2025-10-30T14:13:51.991415541Z",
543+ "response": {
544+ "resourceId": 114019,
545+ "resource": {
546+ "resourceEndpointScript": "active active python script content here",
547+ "terraformAwsScript": "active active terraform script content here"
548+ }
549+ },
550+ "links": [
551+ {
552+ "type": "GET",
553+ "href": "https://api-staging.qa.redislabs.com/v1/tasks/5f73ce79-17df-5db1-a2de-18993ea71f00",
554+ "rel": "self"
555+ }
556+ ]
557+ }` ,
558+ ),
559+ },
560+ expectedResult : & pl.PrivateLinkEndpointScript {
561+ ResourceEndpointScript : redis .String ("active active python script content here" ),
562+ TerraformAwsScript : redis .String ("active active terraform script content here" ),
484563 },
485- expectedResult : redis .String ("an active active aws terraform endpoint script" ),
486564 },
487565 }
488566 for _ , testCase := range tc {
0 commit comments