Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestCase ¶
type TestCase struct {
// Slug is the unique identifier for this test case. For now, it must match the slug of the stage from the course's YAML definition.
Slug string
// TestFunc is the function that'll be run against the user's code.
TestFunc func(testCaseHarness *test_case_harness.TestCaseHarness) error
// Timeout is the maximum amount of time that the test case can run for.
Timeout time.Duration
}
TestCase represents a test case that'll be run against the user's code.
For now, we only support one test case per stage. This may change in the future.
We enforce the one-test-case-per-stage rule by requiring that the test case's slug matches the stage's slug (from the YAML definition).
func (TestCase) CustomOrDefaultTimeout ¶
type TesterDefinition ¶
type TesterDefinition struct {
// Example: spawn_redis_server.sh
ExecutableFileName string
TestCases []TestCase
AntiCheatTestCases []TestCase
}
func (TesterDefinition) TestCaseBySlug ¶
func (t TesterDefinition) TestCaseBySlug(slug string) TestCase
Click to show internal directories.
Click to hide internal directories.