Skip to content

Commit dfcb336

Browse files
committed
fix/batch-changes: drop orphaned hook files parse test
The hook-files parse-time validation lives in lib/batches (synced from the sourcegraph monorepo) and was intentionally removed from this PR in 996bcec. The service_test case for it remained, so ParseBatchSpec returned no error and the test nil-dereferenced err.Error(). The executor sink check in createFilesToMount (and its test) remains as src-cli's defense.
1 parent 996bcec commit dfcb336

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

internal/batches/service/service_test.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -615,31 +615,6 @@ changesetTemplate:
615615
`,
616616
expectedErr: errors.New("parsing batch spec: step 1 files target path contains invalid characters"),
617617
},
618-
{
619-
name: "hook files target path with comma",
620-
batchSpecDir: tempDir,
621-
rawSpec: `
622-
version: 3
623-
name: test-spec
624-
description: A test spec
625-
on:
626-
- repository: github.com/sourcegraph/src-cli
627-
changesetTemplate:
628-
title: Test Hook Files
629-
body: Test hook files target path with comma
630-
branch: test
631-
commit:
632-
message: Test
633-
changesetHooks:
634-
onCIFailure:
635-
steps:
636-
- run: echo test
637-
image: alpine:3
638-
files:
639-
"/tmp/x,source=/var/run/docker.sock,target=/var/run/docker.sock": "IGNORED"
640-
`,
641-
expectedErr: errors.New("parsing batch spec: hooks.onCIFailure step 1 files target path contains invalid characters"),
642-
},
643618
{
644619
name: "mount path dot-dot traversal",
645620
batchSpecDir: tempDir,

0 commit comments

Comments
 (0)