Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 68 additions & 68 deletions cmd/harness/cli/cli_integration_test.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
func TestInstallReturnsWarningAndRollsBackGuidanceArtifactsWhenScopedGuidanceFails(t *testing.T) {
repo := seedInstallGuidanceCommandRepo(t, []installGuidanceCommandTemplateSpec{{
OrbitID: "docs",
AgentsTemplate: "You are the $project_name docs orbit.\n",
AgentsTemplate: "You are the {{ vars.project_name }} docs orbit.\n",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
}})
bindingsPath := writeInstallGuidanceCommandBindings(t, repo.Root)
Expand Down Expand Up @@ -79,16 +79,16 @@ func TestInstallBatchReturnsWarningAndRollsBackGuidanceArtifactsWhenScopedGuidan
repo := seedInstallGuidanceCommandRepo(t, []installGuidanceCommandTemplateSpec{
{
OrbitID: "docs",
AgentsTemplate: "You are the $project_name docs orbit.\n",
AgentsTemplate: "You are the {{ vars.project_name }} docs orbit.\n",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
},
{
OrbitID: "cmd",
AgentsTemplate: "Use the $project_name cmd release flow.\n",
AgentsTemplate: "Use the {{ vars.project_name }} cmd release flow.\n",
Files: map[string]string{
"cmd/README.md": "$project_name cmd guide\n",
"cmd/README.md": "{{ vars.project_name }} cmd guide\n",
},
},
})
Expand Down
4 changes: 2 additions & 2 deletions cmd/harness/cli/commands/install_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestInstallOverwriteRollsBackWhenCleanupFails(t *testing.T) {

runtimeBranch := strings.TrimSpace(repo.Run(t, "branch", "--show-current"))
repo.Run(t, "checkout", "orbit-template/docs")
repo.WriteFile(t, "docs/reference.md", "$project_name reference\n")
repo.WriteFile(t, "docs/reference.md", "{{ vars.project_name }} reference\n")
repo.Run(t, "rm", "-f", "docs/guide.md")
repo.AddAndCommit(t, "update template branch contents")
repo.Run(t, "checkout", runtimeBranch)
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestInstallBatchOverwriteRollsBackWhenCleanupFails(t *testing.T) {

runtimeBranch := strings.TrimSpace(repo.Run(t, "branch", "--show-current"))
repo.Run(t, "checkout", "orbit-template/docs")
repo.WriteFile(t, "docs/reference.md", "$project_name reference\n")
repo.WriteFile(t, "docs/reference.md", "{{ vars.project_name }} reference\n")
repo.Run(t, "rm", "-f", "docs/guide.md")
repo.AddAndCommit(t, "update template branch contents for batch overwrite")
repo.Run(t, "checkout", runtimeBranch)
Expand Down
66 changes: 33 additions & 33 deletions cmd/harness/cli/install_guidance_compose_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ func TestHarnessInstallDryRunPreviewIncludesScopedGuidanceArtifacts(t *testing.T

repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{{
OrbitID: "docs",
AgentsTemplate: "You are the $project_name docs orbit.\n",
HumansTemplate: "Run the $project_name docs workflow.\n",
BootstrapTemplate: "Bootstrap the $project_name docs orbit.\n",
AgentsTemplate: "You are the {{ vars.project_name }} docs orbit.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
BootstrapTemplate: "Bootstrap the {{ vars.project_name }} docs orbit.\n",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
}})
bindingsPath := writeHarnessInstallGuidanceBindings(t, repo.Root)
Expand All @@ -48,7 +48,7 @@ func TestHarnessInstallDryRunPreviewIncludesDescriptionBackedAgentsArtifact(t *t
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{{
OrbitID: "docs",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
}})
bindingsPath := writeHarnessInstallGuidanceBindings(t, repo.Root)
Expand All @@ -71,11 +71,11 @@ func TestHarnessInstallAutoComposesScopedGuidanceArtifacts(t *testing.T) {

repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{{
OrbitID: "docs",
AgentsTemplate: "You are the $project_name docs orbit.\n",
HumansTemplate: "Run the $project_name docs workflow.\n",
BootstrapTemplate: "Bootstrap the $project_name docs orbit.\n",
AgentsTemplate: "You are the {{ vars.project_name }} docs orbit.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
BootstrapTemplate: "Bootstrap the {{ vars.project_name }} docs orbit.\n",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
}})
bindingsPath := writeHarnessInstallGuidanceBindings(t, repo.Root)
Expand Down Expand Up @@ -113,7 +113,7 @@ func TestHarnessInstallAutoComposesDescriptionBackedAgentsAndKeepsHarnessCheckCl
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{{
OrbitID: "docs",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
}})
bindingsPath := writeHarnessInstallGuidanceBindings(t, repo.Root)
Expand Down Expand Up @@ -146,16 +146,16 @@ func TestHarnessInstallScopedGuidanceWarnsOnUnresolvedMarkedGuidanceDrift(t *tes
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{
{
OrbitID: "cmd",
HumansTemplate: "Run the $project_name cmd workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} cmd workflow.\n",
Files: map[string]string{
"cmd/README.md": "$project_name cmd guide\n",
"cmd/README.md": "{{ vars.project_name }} cmd guide\n",
},
},
{
OrbitID: "docs",
HumansTemplate: "Run the $project_name docs workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
Files: map[string]string{
"docs/guide.md": "$project_name docs guide\n",
"docs/guide.md": "{{ vars.project_name }} docs guide\n",
},
},
})
Expand Down Expand Up @@ -195,9 +195,9 @@ func TestHarnessInstallOverwriteExistingOverwritesTouchedGuidanceDrift(t *testin

repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{{
OrbitID: "docs",
HumansTemplate: "Run the $project_name docs workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
Files: map[string]string{
"docs/guide.md": "$project_name docs guide\n",
"docs/guide.md": "{{ vars.project_name }} docs guide\n",
},
}})
bindingsPath := writeHarnessInstallGuidanceBindings(t, repo.Root)
Expand Down Expand Up @@ -232,19 +232,19 @@ func TestHarnessInstallBatchAutoComposesScopedGuidanceArtifacts(t *testing.T) {
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{
{
OrbitID: "docs",
AgentsTemplate: "You are the $project_name docs orbit.\n",
HumansTemplate: "Run the $project_name docs workflow.\n",
BootstrapTemplate: "Bootstrap the $project_name docs orbit.\n",
AgentsTemplate: "You are the {{ vars.project_name }} docs orbit.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
BootstrapTemplate: "Bootstrap the {{ vars.project_name }} docs orbit.\n",
Files: map[string]string{
"docs/guide.md": "$project_name docs guide\n",
"docs/guide.md": "{{ vars.project_name }} docs guide\n",
},
},
{
OrbitID: "cmd",
AgentsTemplate: "Use $project_name cmd release flow.\n",
HumansTemplate: "Run the $project_name cmd workflow.\n",
AgentsTemplate: "Use {{ vars.project_name }} cmd release flow.\n",
HumansTemplate: "Run the {{ vars.project_name }} cmd workflow.\n",
Files: map[string]string{
"cmd/README.md": "$project_name cmd guide\n",
"cmd/README.md": "{{ vars.project_name }} cmd guide\n",
},
},
})
Expand Down Expand Up @@ -283,23 +283,23 @@ func TestHarnessInstallBatchScopedGuidanceWarnsOnUnresolvedMarkedGuidanceDrift(t
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{
{
OrbitID: "cmd",
HumansTemplate: "Run the $project_name cmd workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} cmd workflow.\n",
Files: map[string]string{
"cmd/README.md": "$project_name cmd guide\n",
"cmd/README.md": "{{ vars.project_name }} cmd guide\n",
},
},
{
OrbitID: "docs",
HumansTemplate: "Run the $project_name docs workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
Files: map[string]string{
"docs/guide.md": "$project_name docs guide\n",
"docs/guide.md": "{{ vars.project_name }} docs guide\n",
},
},
{
OrbitID: "ops",
HumansTemplate: "Run the $project_name ops workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} ops workflow.\n",
Files: map[string]string{
"ops/runbook.md": "$project_name ops runbook\n",
"ops/runbook.md": "{{ vars.project_name }} ops runbook\n",
},
},
})
Expand Down Expand Up @@ -341,16 +341,16 @@ func TestHarnessInstallBatchOverwriteExistingOverwritesTouchedGuidanceDrift(t *t
repo := seedHarnessInstallGuidanceRepo(t, []installGuidanceTemplateSpec{
{
OrbitID: "docs",
HumansTemplate: "Run the $project_name docs workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} docs workflow.\n",
Files: map[string]string{
"docs/guide.md": "$project_name docs guide\n",
"docs/guide.md": "{{ vars.project_name }} docs guide\n",
},
},
{
OrbitID: "ops",
HumansTemplate: "Run the $project_name ops workflow.\n",
HumansTemplate: "Run the {{ vars.project_name }} ops workflow.\n",
Files: map[string]string{
"ops/runbook.md": "$project_name ops runbook\n",
"ops/runbook.md": "{{ vars.project_name }} ops runbook\n",
},
},
})
Expand Down
4 changes: 2 additions & 2 deletions cmd/harness/cli/progress_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ func seedInstalledHarnessProgressRepo(t *testing.T) *testutil.Repo {
" value: Orbit\n" +
" description: Product title\n",
Files: map[string]string{
"docs/guide.md": "$project_name guide\n",
"docs/guide.md": "{{ vars.project_name }} guide\n",
},
AgentsTemplate: "Follow $project_name docs workflow\n",
AgentsTemplate: "Follow {{ vars.project_name }} docs workflow\n",
},
})

Expand Down
4 changes: 2 additions & 2 deletions cmd/harness/cli/template_publish_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func TestHarnessTemplatePublishPushesWhenRemoteTemplateBranchAdvancedBeyondLocal

remoteGuide, readErr := gitpkg.ReadFileAtRemoteRef(context.Background(), repo.Root, remoteURL, "refs/heads/harness-template/workspace", "docs/guide.md")
require.NoError(t, readErr)
require.Equal(t, "$project_name guide v2\n", string(remoteGuide))
require.Equal(t, "{{ vars.project_name }} guide v2\n", string(remoteGuide))

_, readErr = gitpkg.ReadFileAtRemoteRef(context.Background(), repo.Root, remoteURL, "refs/heads/harness-template/workspace", "docs/remote-note.md")
require.Error(t, readErr)
Expand Down Expand Up @@ -402,7 +402,7 @@ func TestHarnessTemplatePublishPushesWhenRemoteTemplateBranchDivergedFromMatchin

remoteGuide, readErr := gitpkg.ReadFileAtRemoteRef(context.Background(), repo.Root, remoteURL, "refs/heads/harness-template/workspace", "docs/guide.md")
require.NoError(t, readErr)
require.Equal(t, "$project_name guide\n", string(remoteGuide))
require.Equal(t, "{{ vars.project_name }} guide\n", string(remoteGuide))

_, readErr = gitpkg.ReadFileAtRemoteRef(context.Background(), repo.Root, remoteURL, "refs/heads/harness-template/workspace", "docs/remote-note.md")
require.Error(t, readErr)
Expand Down
10 changes: 5 additions & 5 deletions cmd/orbit/cli/brief_materialize_check_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestOrbitBriefMaterializeCheckReportsStructuredOnlyWithoutWritingContainer(
t.Parallel()

repo := seedBriefMaterializeRevisionRepo(t, "runtime", ""+
"You are the $project_name docs orbit.\n"+
"You are the {{ vars.project_name }} docs orbit.\n"+
"Keep release notes current.\n",
"",
)
Expand All @@ -37,7 +37,7 @@ func TestOrbitBriefMaterializeCheckReportsInSyncJSON(t *testing.T) {
t.Parallel()

repo := seedBriefMaterializeRevisionRepo(t, "runtime", ""+
"You are the $project_name docs orbit.\n"+
"You are the {{ vars.project_name }} docs orbit.\n"+
"Keep release notes current.\n",
""+
"Workspace overview.\n"+
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestOrbitBriefMaterializeCheckReportsDriftedWithoutWriting(t *testing.T) {
t.Parallel()

repo := seedBriefMaterializeRevisionRepo(t, "orbit_template", ""+
"You are the $project_name docs orbit.\n"+
"You are the {{ vars.project_name }} docs orbit.\n"+
"Keep release notes current.\n",
""+
"Workspace overview.\n"+
Expand Down Expand Up @@ -113,7 +113,7 @@ func TestOrbitBriefMaterializeCheckReportsInvalidContainer(t *testing.T) {
t.Parallel()

repo := seedBriefMaterializeRevisionRepo(t, "source", ""+
"You are the $project_name docs orbit.\n",
"You are the {{ vars.project_name }} docs orbit.\n",
""+
"Workspace overview.\n"+
"<!-- orbit:begin workflow=\"docs\" -->\n"+
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestOrbitBriefMaterializeCheckReportsMissingTruthAndRecoverableBackfillJSON
func TestOrbitBriefMaterializeCheckRejectsPlainRevision(t *testing.T) {
t.Parallel()

repo := seedBriefMaterializeRevisionRepo(t, "", "You are the $project_name docs orbit.\n", "")
repo := seedBriefMaterializeRevisionRepo(t, "", "You are the {{ vars.project_name }} docs orbit.\n", "")

stdout, stderr, err := executeCLI(t, repo.Root, "brief", "materialize", "--orbit", "docs", "--check")
require.Error(t, err)
Expand Down
Loading
Loading