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

Update Go tests #267

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Update Go tests #267

merged 1 commit into from
Jul 14, 2023

Conversation

adityasaky
Copy link
Member

@adityasaky adityasaky commented Jul 14, 2023

Fixes #231

  • Create named errors for reuse and testing
  • Assert in tests expected named errors
  • Add test for subject-specific restriction on subject RD

@adityasaky adityasaky requested a review from a team as a code owner July 14, 2023 17:19
Copy link
Contributor

@TomHennen TomHennen left a comment

Choose a reason for hiding this comment

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

Looks good! Just a couple comments.

go/v1/statement_test.go Outdated Show resolved Hide resolved
go/v1/statement_test.go Outdated Show resolved Hide resolved
* Create named errors for reuse and testing
* Assert in tests expected named errors
* Add test for subject-specific restriction on subject RD
* Update to use test tables

Signed-off-by: Aditya Sirish <[email protected]>
Copy link
Contributor

@TomHennen TomHennen left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@marcelamelara marcelamelara left a comment

Choose a reason for hiding this comment

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

Thank you @adityasaky !

@marcelamelara marcelamelara merged commit 03b7684 into in-toto:main Jul 14, 2023
@adityasaky adityasaky deleted the fix-231 branch July 16, 2023 18:51
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.

Use errors.Is() in Golang tests
3 participants