Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon how can I use the --dry-run option to test my retry command


how can I use the --dry-run option to test my retry command


To use the `--dry-run` option to test your retry command, you can incorporate it into your command-line interface (CLI) or API calls. Here are some examples:

1. Command-Line Interface (CLI):
- Rclone:

bash
     rclone sync --dry-run source destination
     

This command will simulate the sync operation without actually transferring files.

- Android Attestation (Atest):

bash
     atest --dry-run
     

This option allows you to run tests without actually building, installing, or running them.

- Istio:

bash
     istioctl dashboard prometheus
     

This command opens the Prometheus dashboard, where you can check the dry-run result in metrics.

2. API Calls:
- Rclone Remote Control (RC):

bash
     POST /rc HTTP/1.1
     Content-Type: application/json

     {
       "cmd": "sync",
       "flags": ["--dry-run"],
       "args": ["source", "destination"]
     }
     

This API call simulates the sync operation without actually transferring files.

These examples demonstrate how to use the `--dry-run` option to test your retry command in various contexts.

Citations:
[1] https://github.com/dotnet/command-line-api/issues/1670
[2] https://istio.io/latest/docs/tasks/security/authorization/authz-dry-run/
[3] https://source.android.com/docs/core/tests/development/atest
[4] https://forum.rclone.org/t/how-to-execute-sync-copy-or-sync-sync-with-dry-run-option-via-post-request-to-the-api/33718
[5] https://github.com/cucumber/cucumber-jvm/issues/424