From a9c5a40087348ac47d94f2cc71a8d76e946a1b98 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 7 Oct 2022 15:55:45 +0200 Subject: [PATCH] pkg/system: rename some tests to be more descriptive Removing the "Linux" suffix from one test, which should probably be rewritten to be run on "unix", to provide test-coverage for those implementations. Signed-off-by: Sebastiaan van Stijn --- pkg/system/chtimes_linux_test.go | 4 ++-- pkg/system/chtimes_test.go | 5 +++-- pkg/system/chtimes_windows_test.go | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/system/chtimes_linux_test.go b/pkg/system/chtimes_linux_test.go index 4f3d7eac6d..091b8aba44 100644 --- a/pkg/system/chtimes_linux_test.go +++ b/pkg/system/chtimes_linux_test.go @@ -8,8 +8,8 @@ import ( "time" ) -// TestChtimesLinux tests Chtimes access time on a tempfile on Linux -func TestChtimesLinux(t *testing.T) { +// TestChtimesATime tests Chtimes access time on a tempfile. +func TestChtimesATime(t *testing.T) { file := filepath.Join(t.TempDir(), "exist") if err := os.WriteFile(file, []byte("hello"), 0o644); err != nil { t.Fatal(err) diff --git a/pkg/system/chtimes_test.go b/pkg/system/chtimes_test.go index 020c8806fb..eb85110a45 100644 --- a/pkg/system/chtimes_test.go +++ b/pkg/system/chtimes_test.go @@ -7,8 +7,9 @@ import ( "time" ) -// TestChtimes tests Chtimes on a tempfile. Test only mTime, because aTime is OS dependent -func TestChtimes(t *testing.T) { +// TestChtimesModTime tests Chtimes on a tempfile. Test only mTime, because +// aTime is OS dependent. +func TestChtimesModTime(t *testing.T) { file := filepath.Join(t.TempDir(), "exist") if err := os.WriteFile(file, []byte("hello"), 0o644); err != nil { t.Fatal(err) diff --git a/pkg/system/chtimes_windows_test.go b/pkg/system/chtimes_windows_test.go index 5c05e8e905..cd84f5643f 100644 --- a/pkg/system/chtimes_windows_test.go +++ b/pkg/system/chtimes_windows_test.go @@ -11,8 +11,8 @@ import ( "time" ) -// TestChtimesWindows tests Chtimes access time on a tempfile on Windows -func TestChtimesWindows(t *testing.T) { +// TestChtimesATimeWindows tests Chtimes access time on a tempfile on Windows. +func TestChtimesATimeWindows(t *testing.T) { file := filepath.Join(t.TempDir(), "exist") if err := os.WriteFile(file, []byte("hello"), 0o644); err != nil { t.Fatal(err)