]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - remote/ainsl/ainsl_test.go
Use SPDX license identifiers
[safcm/safcm.git] / remote / ainsl / ainsl_test.go
index ed52bb0f758f4981948e4ff9fbf5b6918f1bee8c..97046f084237d3e063522ed917d82c63716ae644 100644 (file)
@@ -1,17 +1,5 @@
-// Copyright (C) 2021  Simon Ruderich
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Copyright (C) 2021-2024  Simon Ruderich
 
 package ainsl
 
@@ -33,7 +21,7 @@ func TestHandle(t *testing.T) {
        if err != nil {
                t.Fatal(err)
        }
-       defer os.Chdir(cwd)
+       defer os.Chdir(cwd) //nolint:errcheck
 
        err = os.RemoveAll("testdata")
        if err != nil {
@@ -94,7 +82,7 @@ func TestHandle(t *testing.T) {
                        nil,
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0640,
                                        Data: []byte("line\n"),
@@ -141,7 +129,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("line\n"),
@@ -161,7 +149,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("existing\nline\n"),
@@ -182,7 +170,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("existing\nline\n"),
@@ -204,7 +192,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("first\nline\n"),
@@ -225,7 +213,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("first\nline\n"),
@@ -246,7 +234,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("# line with spaces\nline with spaces\n"),
@@ -268,7 +256,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: fs.ModeSymlink | 0777,
                                        Data: []byte("target"),
@@ -287,7 +275,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: fs.ModeNamedPipe | 0640,
                                },