From 5d8a2199b6c8dc5f75b529a39d196c6cb14c98c2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 21 Aug 2025 00:18:50 +0900 Subject: container/init: op interface valid method Check ops early and eliminate duplicate checks. Signed-off-by: Ophestra --- container/initremount_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'container/initremount_test.go') diff --git a/container/initremount_test.go b/container/initremount_test.go index a59160b9..db5476ec 100644 --- a/container/initremount_test.go +++ b/container/initremount_test.go @@ -6,6 +6,12 @@ import ( ) func TestRemountOp(t *testing.T) { + checkOpsValid(t, []opValidTestCase{ + {"nil", (*RemountOp)(nil), false}, + {"zero", new(RemountOp), false}, + {"valid", &RemountOp{Target: MustAbs("/"), Flags: syscall.MS_RDONLY}, true}, + }) + checkOpsBuilder(t, []opsBuilderTestCase{ {"root", new(Ops).Remount(MustAbs("/"), syscall.MS_RDONLY), Ops{ &RemountOp{ -- cgit v1.3.1