Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

refactors sarif test #469

Merged
merged 5 commits into from
Aug 24, 2022
Merged

refactors sarif test #469

merged 5 commits into from
Aug 24, 2022

Conversation

dani-santos-code
Copy link
Contributor

reference: https://github.com/Shopify/kubeaudit/pull/453/files#r938176410

this PR:

  • exports the results field in the Report struct:
type Report struct {
	Results []Result
}
  • renames results function to GetResults:
func (r *Report) GetResults() []Result

Copy link
Contributor

@genevieveluyt genevieveluyt left a comment

Choose a reason for hiding this comment

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

I added some commits to:

  1. Add a NewReport function so we don't have to make any breaking changes
  2. Make workloadResult exported so you can use it in your test

Lmk what you think. The tests themselves look great!

@dani-santos-code dani-santos-code marked this pull request as ready for review August 23, 2022 18:05
@dani-santos-code
Copy link
Contributor Author

dani-santos-code commented Aug 23, 2022

great idea! renaming Results to GetResults was an unnecessary breaking change when we can just export workloadResult. Also liked the wrapper around Results, with NewReport. Thanks for pairing on this! 🙏

@dani-santos-code dani-santos-code merged commit e9fce13 into main Aug 24, 2022
@dani-santos-code dani-santos-code deleted the ds/refactors-sarif-test2 branch August 24, 2022 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants