aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initsymlink_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/initsymlink_test.go')
-rw-r--r--container/initsymlink_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/container/initsymlink_test.go b/container/initsymlink_test.go
index 1051beb0..4ae2da86 100644
--- a/container/initsymlink_test.go
+++ b/container/initsymlink_test.go
@@ -3,6 +3,14 @@ package container
import "testing"
func TestSymlinkOp(t *testing.T) {
+ checkOpsValid(t, []opValidTestCase{
+ {"nil", (*SymlinkOp)(nil), false},
+ {"zero", new(SymlinkOp), false},
+ {"nil target", &SymlinkOp{LinkName: "/run/current-system"}, false},
+ {"zero linkname", &SymlinkOp{Target: MustAbs("/run/current-system")}, false},
+ {"valid", &SymlinkOp{Target: MustAbs("/run/current-system"), LinkName: "/run/current-system", Dereference: true}, true},
+ })
+
checkOpsBuilder(t, []opsBuilderTestCase{
{"current-system", new(Ops).Link(
MustAbs("/run/current-system"),