There is an integration test that is currently failing when attempting to get a non-existing object. The test expects the CLI to return an error, but it does not. Instead, the command completes without raising an error.
Steps to Reproduce
Run the integration tests or the following command:
go run . -c config.json get "non-existent-file" /dev/null
echo $?
Observe that the command does not return an error, even though the file does not exist.
Expected Behavior
The CLI should return an error when attempting to get a non-existing object. Specifically, the implementation should raise an error when the downloaded file size is 0.
Actual Behavior
The CLI completes the command without raising an error, even when the file does not exist.
Suggested Fix
Adapt the implementation to raise an error when the downloaded file size is 0. This behavior is already correctly described by the current test.
Logs
------------------------------
General testing for all Azure regions Invoking `get` on a non-existent-key fails with default config
/Users/sebastian/workspace/bosh-azure-storage-cli/integration/general_azure_test.go:34
2024/08/08 17:18:42 Downloading https://shtestbosh.blob.core.windows.net/shtestboshcontainer/non-existent-file
[FAILED] in [It] - /Users/sebastian/workspace/bosh-azure-storage-cli/integration/assertions.go:71 @ 08/08/24 17:18:42.833
• [FAILED] [0.482 seconds]
General testing for all Azure regions Invoking `get` on a non-existent-key fails [It] with default config
/Users/sebastian/workspace/bosh-azure-storage-cli/integration/general_azure_test.go:34
[FAILED] Expected
<int>: 0
not to be zero-valued
In [It] at: /Users/sebastian/workspace/bosh-azure-storage-cli/integration/assertions.go:71 @ 08/08/24 17:18:42.833
------------------------------
Sounds good. Also noticed that we don't currently run the integration tests as part of the pipeline, so that would probably be a good thing for us to fix too.
Description
There is an integration test that is currently failing when attempting to get a non-existing object. The test expects the CLI to return an error, but it does not. Instead, the command completes without raising an error.
Steps to Reproduce
Run the integration tests or the following command:
Observe that the command does not return an error, even though the file does not exist.
Expected Behavior
The CLI should return an error when attempting to get a non-existing object. Specifically, the implementation should raise an error when the downloaded file size is 0.
Actual Behavior
The CLI completes the command without raising an error, even when the file does not exist.
Suggested Fix
Adapt the implementation to raise an error when the downloaded file size is 0. This behavior is already correctly described by the current test.
Logs