Skip to content

Refactor dirs test for hns#2194

Merged
ankitaluthra1 merged 5 commits into
masterfrom
refactor-dir-test-for-hns
Jul 22, 2024
Merged

Refactor dirs test for hns#2194
ankitaluthra1 merged 5 commits into
masterfrom
refactor-dir-test-for-hns

Conversation

@ankitaluthra1

Copy link
Copy Markdown
Contributor

Description

This includes changes only in unit tests, below is the details for changes

  • Seggregate dirs test for hns and flat bucket
  • Add mock bucket using new stretchr/testify
  • Use mock bucket instead of fake bucket in hns dirs test

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - Done
  3. Integration tests - NA

@ankitaluthra1 ankitaluthra1 requested a review from a team as a code owner July 22, 2024 05:15
Comment thread internal/storage/new_mock_bucket.go
Comment thread internal/fs/inode/hns_dir_test.go Outdated
Comment thread internal/fs/inode/hns_dir_test.go
Comment thread internal/fs/inode/hns_dir_test.go Outdated
Comment thread internal/storage/new_mock_bucket.go
Comment thread internal/fs/inode/hns_dir_test.go Outdated
Tulsishah
Tulsishah previously approved these changes Jul 22, 2024
Comment thread internal/storage/new_mock_bucket.go
@codecov

codecov Bot commented Jul 22, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 71.12%. Comparing base (a5d3a92) to head (87479aa).
Report is 1 commits behind head on master.

Files Patch % Lines
internal/storage/new_mock_bucket.go 0.00% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2194      +/-   ##
==========================================
- Coverage   71.41%   71.12%   -0.29%     
==========================================
  Files         102      103       +1     
  Lines       11344    11388      +44     
==========================================
- Hits         8101     8100       -1     
- Misses       2908     2953      +45     
  Partials      335      335              
Flag Coverage Δ
unittests 71.12% <0.00%> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ankitaluthra1 ankitaluthra1 merged commit afc945a into master Jul 22, 2024
@ankitaluthra1 ankitaluthra1 deleted the refactor-dir-test-for-hns branch July 22, 2024 07:08
Tulsishah added a commit that referenced this pull request Jul 23, 2024
* move files (#2157)

* Refactor dirs test for hns (#2194)

* adds stretchr testify mock bucket for hns dirs test

* adds stretchr testify mock bucket for hns dirs test

* fix PR comments

* fix PR comments

* fix PR comments

* Migrate goo.gl links to TinyURL. (#2193)

Google is
[shutting down](https://developers.googleblog.com/en/google-url-shortener-links-will-no-longer-be-available/)
`goo.gl` short link redirects (after
[previously announcing](https://developers.googleblog.com/en/transitioning-google-url-shortener-to-firebase-dynamic-links/)
that they'll continue to work).

Google also previously announced that you could export your links from "the
`goo.gl` console", but I can't find that anywhere (the site is now just a
redirect to their stupid blog post), so I had to do this by hand. There may be
some errors.

* Bump Dependabot PRs (#2195)

* Bump golang.org/x/sys from 0.21.0 to 0.22.0 (#2123)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.21.0 to 0.22.0.
- [Commits](golang/sys@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cloud.google.com/go/storage from 1.42.0 to 1.43.0 (#2127)

Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](googleapis/google-cloud-go@spanner/v1.42.0...spanner/v1.43.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang from 1.22.4-alpine to 1.22.5-alpine (#2130)

Bumps golang from 1.22.4-alpine to 1.22.5-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.26.0 to 0.27.0 (#2124)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.27.0.
- [Commits](golang/net@v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#2125)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* Bump google.golang.org/api from 0.186.0 to 0.188.0 (#2168)

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.186.0 to 0.188.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.186.0...v0.188.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* Bump cloud.google.com/go/compute/metadata from 0.3.0 to 0.5.0 (#2166)

Bumps [cloud.google.com/go/compute/metadata](https://github.com/googleapis/google-cloud-go) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](googleapis/google-cloud-go@v0.3.0...v0.5.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/compute/metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* fix merge conflict

* upgrade grpc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rexml from 3.2.8 to 3.3.2 in /tools/gem_dependency

Bumps [rexml](https://github.com/ruby/rexml) from 3.2.8 to 3.3.2.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](ruby/rexml@v3.2.8...v3.3.2)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ashmeen Kaur <57195160+ashmeenkaur@users.noreply.github.com>
Co-authored-by: Ankita Luthra <lankita@google.com>
Co-authored-by: Aaron Jacobs <aaronjjacobs@gmail.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Tulsishah added a commit that referenced this pull request Jul 23, 2024
* move files (#2157)

* Refactor dirs test for hns (#2194)

* adds stretchr testify mock bucket for hns dirs test

* adds stretchr testify mock bucket for hns dirs test

* fix PR comments

* fix PR comments

* fix PR comments

* Migrate goo.gl links to TinyURL. (#2193)

Google is
[shutting down](https://developers.googleblog.com/en/google-url-shortener-links-will-no-longer-be-available/)
`goo.gl` short link redirects (after
[previously announcing](https://developers.googleblog.com/en/transitioning-google-url-shortener-to-firebase-dynamic-links/)
that they'll continue to work).

Google also previously announced that you could export your links from "the
`goo.gl` console", but I can't find that anywhere (the site is now just a
redirect to their stupid blog post), so I had to do this by hand. There may be
some errors.

* Bump Dependabot PRs (#2195)

* Bump golang.org/x/sys from 0.21.0 to 0.22.0 (#2123)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.21.0 to 0.22.0.
- [Commits](golang/sys@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cloud.google.com/go/storage from 1.42.0 to 1.43.0 (#2127)

Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](googleapis/google-cloud-go@spanner/v1.42.0...spanner/v1.43.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang from 1.22.4-alpine to 1.22.5-alpine (#2130)

Bumps golang from 1.22.4-alpine to 1.22.5-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.26.0 to 0.27.0 (#2124)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.27.0.
- [Commits](golang/net@v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#2125)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* Bump google.golang.org/api from 0.186.0 to 0.188.0 (#2168)

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.186.0 to 0.188.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.186.0...v0.188.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* Bump cloud.google.com/go/compute/metadata from 0.3.0 to 0.5.0 (#2166)

Bumps [cloud.google.com/go/compute/metadata](https://github.com/googleapis/google-cloud-go) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](googleapis/google-cloud-go@v0.3.0...v0.5.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/compute/metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>

* fix merge conflict

* upgrade grpc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rexml from 3.2.8 to 3.3.2 in /tools/gem_dependency

Bumps [rexml](https://github.com/ruby/rexml) from 3.2.8 to 3.3.2.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](ruby/rexml@v3.2.8...v3.3.2)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ashmeen Kaur <57195160+ashmeenkaur@users.noreply.github.com>
Co-authored-by: Ankita Luthra <lankita@google.com>
Co-authored-by: Aaron Jacobs <aaronjjacobs@gmail.com>
Co-authored-by: Tulsi Shah <46474643+Tulsishah@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants