digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 397 forks source link

Add Database Replica Integration Tests #1596

Closed gsquire closed 1 month ago

gsquire commented 1 month ago

This patch adds the remaining database replica integration tests. It also corrects some of the parameters for the replica promote test.

Tested with make test_integration.

Closes #1359

gsquire commented 1 month ago

I do want to call out the fact that I couldn't find the corresponding API for the replica connection command. So there isn't an integration test for that. I searched for 'replica' here. If someone could help point me in the right direction, I can add it in. Thanks!

andrewsomething commented 1 month ago

@gsquire Thanks for this great contribution!

I do want to call out the fact that I couldn't find the corresponding API for the replica connection command.

The replica connection command is a bit of an abstraction. There is a not an endpoint that only returns that information. If you look at the implementation, you'll see that we're calling the GET /v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME endpoint and just surfacing the connection information.

https://github.com/digitalocean/doctl/blob/062646883a3a9e3c24cce7d1a43a030a089abc4c/do/databases.go#L622-L631

gsquire commented 1 month ago

The replica connection command is a bit of an abstraction.

Ah, okay. Thanks for reviewing!