diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-02 04:54:34 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-02 04:54:34 +0900 |
| commit | 6f719bc3c19d56279d2d76d3bcf8fb66ace2d2fb (patch) | |
| tree | 6e9e84fd6f382fa823c87a70a0df0284dc127250 /system/tmpfiles_test.go | |
| parent | 1b5d20a39b2c5720d83a8eaf3d2227deb46a7c0d (diff) | |
system: update doc commands and remove mutex
The mutex is not really doing anything, none of these methods make sense when called concurrently anyway. The copylocks analysis is still satisfied by the noCopy struct.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/tmpfiles_test.go')
| -rw-r--r-- | system/tmpfiles_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/system/tmpfiles_test.go b/system/tmpfiles_test.go index 27a21a08..1ed07c62 100644 --- a/system/tmpfiles_test.go +++ b/system/tmpfiles_test.go @@ -15,10 +15,10 @@ func TestCopyFile(t *testing.T) { } for _, tc := range testCases { t.Run("copy file "+tc.path+" with cap = "+strconv.Itoa(tc.cap)+" n = "+strconv.Itoa(int(tc.n)), func(t *testing.T) { - sys := New(150) + sys := New(t.Context(), 150) sys.CopyFile(new([]byte), tc.path, tc.cap, tc.n) tc.test(t, sys.ops, []Op{ - &Tmpfile{nil, tc.path, tc.n, nil}, + &TmpfileOp{nil, tc.path, tc.n, nil}, }, "CopyFile") }) } @@ -33,10 +33,10 @@ func TestLink(t *testing.T) { } for _, tc := range testCases { t.Run("link file "+tc.dst+" from "+tc.src, func(t *testing.T) { - sys := New(150) + sys := New(t.Context(), 150) sys.Link(tc.src, tc.dst) (&tcOp{Process, tc.src}).test(t, sys.ops, []Op{ - &Hardlink{Process, tc.dst, tc.src}, + &HardlinkOp{Process, tc.dst, tc.src}, }, "Link") }) } @@ -52,10 +52,10 @@ func TestLinkFileType(t *testing.T) { } for _, tc := range testCases { t.Run("link file "+tc.dst+" from "+tc.path+" with type "+TypeString(tc.et), func(t *testing.T) { - sys := New(150) + sys := New(t.Context(), 150) sys.LinkFileType(tc.et, tc.path, tc.dst) tc.test(t, sys.ops, []Op{ - &Hardlink{tc.et, tc.dst, tc.path}, + &HardlinkOp{tc.et, tc.dst, tc.path}, }, "LinkFileType") }) } @@ -73,7 +73,7 @@ func TestTmpfile_String(t *testing.T) { for _, tc := range testCases { t.Run(tc.want, func(t *testing.T) { - if got := (&Tmpfile{src: tc.src, n: tc.n}).String(); got != tc.want { + if got := (&TmpfileOp{src: tc.src, n: tc.n}).String(); got != tc.want { t.Errorf("String() = %v, want %v", got, tc.want) } }) |
