Reorganize user and operator documentation
This commit is contained in:
@@ -2647,23 +2647,29 @@ func TestRunPipelineDiagnosticsDirFlagOverridesWorkspaceDiagnosticsOnly(t *testi
|
||||
}
|
||||
|
||||
func TestExampleFixtureConfigValidateAndPipelinesList(t *testing.T) {
|
||||
configPath := fixturePath(t, "examples/dnd-spells.config.yml")
|
||||
for _, path := range []string{
|
||||
"examples/dnd-spells.config.yml",
|
||||
"examples/dnd-spells-production.config.yml",
|
||||
} {
|
||||
path := path
|
||||
t.Run("validate "+filepath.Base(path), func(t *testing.T) {
|
||||
configPath := fixturePath(t, path)
|
||||
var stdout bytes.Buffer
|
||||
var stderr bytes.Buffer
|
||||
|
||||
t.Run("validate configured pipeline", func(t *testing.T) {
|
||||
var stdout bytes.Buffer
|
||||
var stderr bytes.Buffer
|
||||
code := RunWithOptions([]string{"config", "validate", "--config", configPath, "--pipeline", "dnd-session"}, &stdout, &stderr, Options{})
|
||||
|
||||
code := RunWithOptions([]string{"config", "validate", "--config", configPath, "--pipeline", "dnd-session"}, &stdout, &stderr, Options{})
|
||||
|
||||
if code != 0 {
|
||||
t.Fatalf("RunWithOptions() code = %d, stderr=%q", code, stderr.String())
|
||||
}
|
||||
if !strings.Contains(stdout.String(), "dnd-session") {
|
||||
t.Fatalf("stdout = %q, want pipeline ID", stdout.String())
|
||||
}
|
||||
})
|
||||
if code != 0 {
|
||||
t.Fatalf("RunWithOptions() code = %d, stderr=%q", code, stderr.String())
|
||||
}
|
||||
if !strings.Contains(stdout.String(), "dnd-session") {
|
||||
t.Fatalf("stdout = %q, want pipeline ID", stdout.String())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
t.Run("list configured pipelines", func(t *testing.T) {
|
||||
configPath := fixturePath(t, "examples/dnd-spells.config.yml")
|
||||
var stdout bytes.Buffer
|
||||
var stderr bytes.Buffer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user