Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Test Failure: get Command on Non-Existing Object #17

Open
s4heid opened this issue Aug 8, 2024 · 1 comment
Open

Integration Test Failure: get Command on Non-Existing Object #17

s4heid opened this issue Aug 8, 2024 · 1 comment

Comments

@s4heid
Copy link
Contributor

s4heid commented Aug 8, 2024

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:

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
------------------------------
@jpalermo
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Changes | Open for Contribution
Development

No branches or pull requests

2 participants