Skip to content

Commit

Permalink
remove func
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Janiszewski <[email protected]>
  • Loading branch information
janisz committed Jan 16, 2024
1 parent 96b6435 commit 3ee6424
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/framework/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *runner) Require() *require.Assertions {
}

func (r *runner) readAndValidateYAML(fileName, fileContents string, resources openapi.Resources) []unstructured.Unstructured {
validator := validation.NewSchemaValidation(OpenAPIResourcesGetter(resources))
validator := validation.NewSchemaValidation(openAPIResourcesGetter{resources: resources})

yamlReader := yaml.NewYAMLReader(bufio.NewReader(strings.NewReader(fileContents)))

Expand Down
6 changes: 0 additions & 6 deletions pkg/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,3 @@ type openAPIResourcesGetter struct {
func (o openAPIResourcesGetter) OpenAPISchema() (openapi.Resources, error) {
return o.resources, nil
}

// OpenAPIResourcesGetter returns resources wrapped in a simple implementation of openapi.OpenAPIResourcesGetter
// that returns a fixed set of resources.
func OpenAPIResourcesGetter(resources openapi.Resources) openapi.OpenAPIResourcesGetter {
return openAPIResourcesGetter{resources: resources}
}

0 comments on commit 3ee6424

Please sign in to comment.