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>
This commit is contained in:
Sebastiaan van Stijn 2022-10-07 15:55:45 +02:00
parent ab7bc6b7d2
commit a9c5a40087
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 7 additions and 6 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)