Skip to content

Commit

Permalink
add godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Mar 12, 2024
1 parent fb923d8 commit eeda0fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conformance/conformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import (
"gopkg.in/yaml.v3"
)

// DefaultOptions will parse the test binary flags and create a configuration
// that can be used to run Gateway API conformance tests.
//
// End-users downstream can override options after instantiation
func DefaultOptions(t *testing.T) *suite.ExperimentalConformanceOptions {
return &suite.ExperimentalConformanceOptions{
Options: *DefaultLegacyOptions(t),
Expand All @@ -47,6 +51,8 @@ func DefaultOptions(t *testing.T) *suite.ExperimentalConformanceOptions {
}
}

// RunConformance will run the Gateway API conformance tests given the supplied options.
// If options is nil then the DefaultOptions will be instantiated
func RunConformance(t *testing.T, opts *suite.ExperimentalConformanceOptions) {
if opts == nil {
opts = DefaultOptions(t)
Expand Down
4 changes: 4 additions & 0 deletions conformance/utils/suite/experimental_profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ var (
}
)

// RegisterConformanceProfile allows downstream tests to register unique profiles that
// define their own set of core features.
//
// If a conformance profile with the same name exists this function will panic
func RegisterConformanceProfile(p ConformanceProfile) {
_, ok := conformanceProfileMap[p.Name]
if ok {
Expand Down

0 comments on commit eeda0fe

Please sign in to comment.