Remove unused helpers and retired path fields
This commit is contained in:
@@ -259,7 +259,7 @@ func hashAnalyzeInputFile(paths artifacts.SessionPaths, path string) (string, in
|
||||
if err != nil {
|
||||
return "", 0, fmt.Errorf("resolve input below session root: %w", err)
|
||||
}
|
||||
relative, err = pathsafe.NormalizeRelativeDestination(filepath.ToSlash(relative))
|
||||
_, err = pathsafe.NormalizeRelativeDestination(filepath.ToSlash(relative))
|
||||
if err != nil {
|
||||
return "", 0, fmt.Errorf("input path is outside session root: %w", err)
|
||||
}
|
||||
|
||||
@@ -954,8 +954,6 @@ type extractFixture struct {
|
||||
inputPath string
|
||||
}
|
||||
|
||||
func stringPointerForExtractTest(value string) *string { return &value }
|
||||
|
||||
func extractFixtureFromEnv(t *testing.T, env *Env, m *manifest.Manifest) extractFixture {
|
||||
t.Helper()
|
||||
paths := sessionPathsForEnv(env, m.SessionID)
|
||||
|
||||
@@ -752,17 +752,6 @@ func findManifestInput(t *testing.T, inputs []manifest.InputRecord, kind string)
|
||||
return manifest.InputRecord{}
|
||||
}
|
||||
|
||||
func assertManifestInputsSorted(t *testing.T, inputs []manifest.InputRecord) {
|
||||
t.Helper()
|
||||
for index := 1; index < len(inputs); index++ {
|
||||
previous := inputs[index-1]
|
||||
current := inputs[index]
|
||||
if previous.Kind > current.Kind || (previous.Kind == current.Kind && previous.Path > current.Path) {
|
||||
t.Fatalf("manifest inputs are not sorted at %d: %#v before %#v", index, previous, current)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func mustReadFileEquals(t *testing.T, path, want string) {
|
||||
t.Helper()
|
||||
data, err := os.ReadFile(path)
|
||||
|
||||
Reference in New Issue
Block a user