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

link not allowed in put meta #1057

Merged
merged 7 commits into from Sep 1, 2022
Merged

link not allowed in put meta #1057

merged 7 commits into from Sep 1, 2022

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Aug 30, 2022

  • Prevented links in meta data for puts
  • refactored for common publish meta functionality
  • Converted all loose errors to vars.
  • Updated unit test to check and cover errors.

@scottf scottf requested a review from piotrpio August 30, 2022 18:28
@piotrpio
Copy link
Collaborator

Tests are failing

=== RUN   TestObjectLinks
    /Users/piotrpiotrowski/go/nats.go/test/object_test.go:544: Unexpected error: nats: a link is not allowed with an object
--- FAIL: TestObjectLinks (0.03s)
=== RUN   TestObjectList
    /Users/piotrpiotrowski/go/nats.go/test/object_test.go:703: Unexpected error: nats: a link is not allowed with an object
--- FAIL: TestObjectList (0.03s)

object.go Outdated Show resolved Hide resolved
@scottf
Copy link
Contributor Author

scottf commented Aug 31, 2022

Tests are failing

I see why. AddLink /Add Bucket Link call put with no data, I think because they were worried about when the link would overwrite an object and wanted to delete the chunks. But we don't allow a link to overwrite an object now.

I'll fix.

@coveralls
Copy link

coveralls commented Aug 31, 2022

Coverage Status

Coverage increased (+0.2%) to 85.69% when pulling e5e62fe on os-no-link-in-put-meta into 0797ed6 on main.

object.go Outdated Show resolved Hide resolved
object.go Outdated Show resolved Hide resolved
object.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

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

LGTM

…to vars. Updated unit test to check and cover errors.
@scottf scottf requested a review from piotrpio August 31, 2022 22:18
@piotrpio
Copy link
Collaborator

piotrpio commented Sep 1, 2022

The build is failing (staticcheck):

test/object_test.go:38:2: this value of obs is never used (SA4006)

test/object_test.go:41:2: this value of obs is never used (SA4006)

test/object_test.go:715:2: this value of lch is never used (SA4006)

Other than that, looks good.

@piotrpio piotrpio merged commit 84e2c74 into main Sep 1, 2022
@piotrpio piotrpio deleted the os-no-link-in-put-meta branch September 1, 2022 12:06
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.

None yet

3 participants