Replace Notarius bundle promotion with rename
This commit is contained in:
@@ -8,6 +8,16 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func mustWriteFile(t *testing.T, path string, data []byte, mode os.FileMode) {
|
||||
t.Helper()
|
||||
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
|
||||
t.Fatalf("MkdirAll(%q) error = %v", filepath.Dir(path), err)
|
||||
}
|
||||
if err := os.WriteFile(path, data, mode); err != nil {
|
||||
t.Fatalf("WriteFile(%q) error = %v", path, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoveAllUnderRootRemovesNestedTreeIdempotently(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
target := filepath.Join(root, "runs", "run-1")
|
||||
|
||||
Reference in New Issue
Block a user