Documentation
¶
Index ¶
- func CompareOutputWithFixture(t *testing.T, testerOutput []byte, normalizeOutputFunc func([]byte) []byte, ...)
- func TestTesterOutput(t *testing.T, testerDefinition tester_definition.TesterDefinition, ...)
- func ValidateTesterDefinitionAgainstYAML(t testing.T, testerDefinition tester_definition.TesterDefinition, ...)
- type TesterOutputTestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestTesterOutput ¶
func TestTesterOutput(t *testing.T, testerDefinition tester_definition.TesterDefinition, testCases map[string]TesterOutputTestCase)
func ValidateTesterDefinitionAgainstYAML ¶
func ValidateTesterDefinitionAgainstYAML(t testing.T, testerDefinition tester_definition.TesterDefinition, yamlPath string)
ValidateTesterDefinitionAgainstYAML tests whether the stage slugs in TesterDefintion match those in the course YAML at yamlPath.
Types ¶
type TesterOutputTestCase ¶
type TesterOutputTestCase struct {
// CodePath is the path to the code that'll be tested.
CodePath string
// ExpectedExitCode is the exit code that we expect the tester to return.
ExpectedExitCode int
// UntilStageSlug is the slug of the stage that we want to test until. Either this or StageSlug must be provided.
UntilStageSlug string
// SkipAntiCheat is a flag that indicates whether we want to skip the anti-cheat check.
SkipAntiCheat *bool
// StageSlugs is the list of stages that we want to test. Either this or UntilStageSlug must be provided.
StageSlugs []string
// StdoutFixturePath is the path to the fixture file that contains the expected stdout output.
StdoutFixturePath string
// NormalizeOutputFunc is a function that normalizes the tester's output. This is useful for removing things like timestamps.
NormalizeOutputFunc func([]byte) []byte
}
Click to show internal directories.
Click to hide internal directories.