Keep recovery handoffs available after publication cancellation
This commit is contained in:
22
internal/gotool/recovery_test.go
Normal file
22
internal/gotool/recovery_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package gotool
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRecoveryFallbackExecutableLifetime(t *testing.T) {
|
||||
for _, test := range []struct {
|
||||
path string
|
||||
temporary bool
|
||||
}{
|
||||
{filepath.Join("tmp", "go-build123456", "b001", "exe", "releasekit"), true},
|
||||
{filepath.Join("cache", "go-build", "hash-d", "releasekit"), false},
|
||||
{filepath.Join("tmp", "tools", "releasekit"), false},
|
||||
{filepath.Join("workspace", "go-build-project", "b001", "exe", "releasekit"), false},
|
||||
} {
|
||||
if got := TemporaryExecutable(test.path); got != test.temporary {
|
||||
t.Errorf("temporary executable %q = %t, want %t", test.path, got, test.temporary)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user