GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage
https://cloud.google.com/storage/docs/gcs-fuse
Apache License 2.0
2.04k stars 421 forks source link

Fix test in GKE environment #2076

Closed Tulsishah closed 3 months ago

Tulsishah commented 3 months ago

Description

I've implemented a check for HierarchicalNamespace.Enabled to incorporate the HNS flag in end-to-end tests. Older buckets lack this attribute, potentially leading to nil pointer exceptions. To mitigate this, I've added a fix to verify the presence of HierarchicalNamespace.

Alternatively, the GKE team could create a new bucket where the HierarchicalNamespace attribute already defined.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - Automated and Ran mounted directory script
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.06%. Comparing base (3995bfb) to head (5221a8b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2076 +/- ## ========================================== + Coverage 71.98% 72.06% +0.07% ========================================== Files 100 99 -1 Lines 11207 10863 -344 ========================================== - Hits 8067 7828 -239 + Misses 2806 2706 -100 + Partials 334 329 -5 ``` | [Flag](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2076/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2076/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | `72.06% <ø> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.