aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/testdata/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-19 20:10:51 +0900
committerOphestra <cat@gensokyo.uk>2026-01-19 21:29:56 +0900
commitd933234784bf3bd511869d55fb145dc1d9601ce1 (patch)
treea898f3c84b35155e0154b95c56016cd866b26228 /internal/pkg/testdata/main.go
parent1c49c75f95855a6b75689f1962dc918ed67c2ccc (diff)
internal/pkg: make checksum available to cure
This enables deduplication by value as implemented in execArtifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/testdata/main.go')
-rw-r--r--internal/pkg/testdata/main.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/pkg/testdata/main.go b/internal/pkg/testdata/main.go
index 83a1ed0f..e2b4ecbb 100644
--- a/internal/pkg/testdata/main.go
+++ b/internal/pkg/testdata/main.go
@@ -21,7 +21,7 @@ func main() {
log.SetFlags(0)
log.SetPrefix("testtool: ")
- var hostNet, layers bool
+ var hostNet, layers, promote bool
if len(os.Args) == 2 && os.Args[0] == "testtool" {
switch os.Args[1] {
case "net":
@@ -34,6 +34,10 @@ func main() {
log.SetPrefix("testtool(layers): ")
break
+ case "promote":
+ promote = true
+ log.SetPrefix("testtool(promote): ")
+
default:
log.Fatalf("Args: %q", os.Args)
return
@@ -46,7 +50,7 @@ func main() {
wantEnv := []string{"HAKUREI_TEST=1"}
if len(os.Environ()) == 2 {
overlayRoot = true
- if !layers {
+ if !layers && !promote {
log.SetPrefix("testtool(overlay root): ")
}
wantEnv = []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}
@@ -208,6 +212,10 @@ func main() {
}
}
+ if promote {
+ ident = "O-6VjlIUxc4PYLf5v35uhIeL8kkYCbHYklqlmDjFPXe0m4j6GkUDg5qwTzBRESnf"
+ }
+
next() // testtool artifact
next()