Selaa lähdekoodia

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 <github@gone.nl>
Sebastiaan van Stijn 2 vuotta sitten
vanhempi
commit
a9c5a40087

+ 2 - 2
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)

+ 3 - 2
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)

+ 2 - 2
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)