aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fs_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-07 20:06:26 +0900
committerOphestra <cat@gensokyo.uk>2025-10-07 20:57:58 +0900
commit0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (patch)
treedfe9c40ceb8c1be8d2728a2db9017bffef174d3d /hst/fs_test.go
parentd23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (diff)
container/check: move absolute pathname
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fs_test.go')
-rw-r--r--hst/fs_test.go23
1 files changed, 12 insertions, 11 deletions
diff --git a/hst/fs_test.go b/hst/fs_test.go
index 00186d20..35d58ad6 100644
--- a/hst/fs_test.go
+++ b/hst/fs_test.go
@@ -9,6 +9,7 @@ import (
"testing"
"hakurei.app/container"
+ "hakurei.app/container/check"
"hakurei.app/hst"
)
@@ -216,11 +217,11 @@ type stubFS struct {
typeName string
}
-func (s stubFS) Valid() bool { return false }
-func (s stubFS) Path() *container.Absolute { panic("unreachable") }
-func (s stubFS) Host() []*container.Absolute { panic("unreachable") }
-func (s stubFS) Apply(*hst.ApplyState) { panic("unreachable") }
-func (s stubFS) String() string { return "<invalid " + s.typeName + ">" }
+func (s stubFS) Valid() bool { return false }
+func (s stubFS) Path() *check.Absolute { panic("unreachable") }
+func (s stubFS) Host() []*check.Absolute { panic("unreachable") }
+func (s stubFS) Apply(*hst.ApplyState) { panic("unreachable") }
+func (s stubFS) String() string { return "<invalid " + s.typeName + ">" }
type sCheck struct {
FS hst.FilesystemConfigJSON `json:"fs"`
@@ -232,8 +233,8 @@ type fsTestCase struct {
fs hst.FilesystemConfig
valid bool
ops container.Ops
- path *container.Absolute
- host []*container.Absolute
+ path *check.Absolute
+ host []*check.Absolute
str string
}
@@ -287,11 +288,11 @@ func checkFs(t *testing.T, testCases []fsTestCase) {
}
}
-func m(pathname string) *container.Absolute { return container.MustAbs(pathname) }
-func ms(pathnames ...string) []*container.Absolute {
- as := make([]*container.Absolute, len(pathnames))
+func m(pathname string) *check.Absolute { return check.MustAbs(pathname) }
+func ms(pathnames ...string) []*check.Absolute {
+ as := make([]*check.Absolute, len(pathnames))
for i, pathname := range pathnames {
- as[i] = container.MustAbs(pathname)
+ as[i] = check.MustAbs(pathname)
}
return as
}