MCPcopy Create free account
hub / github.com/encodeous/nylon / SetupTestDir

Method SetupTestDir

e2e/harness.go:505–513  ·  view source on GitHub ↗

SetupTestDir creates a directory for the current test run

()

Source from the content-addressed store, hash-verified

503
504// SetupTestDir creates a directory for the current test run
505func (h *Harness) SetupTestDir() string {
506 dir := filepath.Join(h.RootDir, "e2e", "runs", h.t.Name())
507 // Clean up previous run
508 os.RemoveAll(dir)
509 if err := os.MkdirAll(dir, 0755); err != nil {
510 h.t.Fatal(err)
511 }
512 return dir
513}
514
515// WriteConfig marshals the config to YAML and writes it to the specified directory with the given filename
516func (h *Harness) WriteConfig(dir, filename string, cfg any) string {

Callers 11

TestRecoveryExampleFunction · 0.95
TestJSONLoggingFunction · 0.95
StartDNSMethod · 0.95
TestConnectivityFunction · 0.95
TestDistributionFunction · 0.95
TestHealthcheckPingFunction · 0.95
TestHealthcheckHTTPFunction · 0.95
TestEndpointResolutionFunction · 0.95
TestDynamicResolutionFunction · 0.95

Calls 1

NameMethod · 0.65

Tested by 10

TestRecoveryExampleFunction · 0.76
TestJSONLoggingFunction · 0.76
TestConnectivityFunction · 0.76
TestDistributionFunction · 0.76
TestHealthcheckPingFunction · 0.76
TestHealthcheckHTTPFunction · 0.76
TestEndpointResolutionFunction · 0.76
TestDynamicResolutionFunction · 0.76