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

fix: use correct indices for file.from and fix tests to verify names #2449

Merged
merged 1 commit into from Apr 26, 2024

Conversation

ddelgrosso1
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2448 🦕

@ddelgrosso1 ddelgrosso1 marked this pull request as ready for review April 26, 2024 19:23
@ddelgrosso1 ddelgrosso1 requested review from a team as code owners April 26, 2024 19:23
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/nodejs-storage API. labels Apr 26, 2024
@ddelgrosso1 ddelgrosso1 added owlbot:run Add this label to trigger the Owlbot post processor. and removed api: storage Issues related to the googleapis/nodejs-storage API. labels Apr 26, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 26, 2024
});

it('should create a File object from a gs:// formatted URL including a folder', () => {
const gsUrl = 'gs://mybucket/myfolder/myfile';
const result = File.from(gsUrl, STORAGE);

assert(result);
assert(result.bucket.name, 'mybucket');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, the assert with 2 params gets me too at times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where the ‘mybucket’ here is treated as the error message

@ddelgrosso1 ddelgrosso1 merged commit d4240fa into googleapis:main Apr 26, 2024
16 checks passed
@ddelgrosso1 ddelgrosso1 deleted the fix-file-from branch April 26, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File.from picks up incorrect bucket name from passed URL
2 participants