Skip to content

Commit

Permalink
Signed-off-by: babugeet <[email protected]>
Browse files Browse the repository at this point in the history
fixed golangci-lint failures
  • Loading branch information
babugeet committed Jun 7, 2024
1 parent 584c29d commit 099c374
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/provisioner/ironic/clients/auth_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package clients

import (
"testing"
"os"
"path"
"path/filepath"
"testing"
)

func TestConfigFromEndpointURL(t *testing.T) {
Expand Down Expand Up @@ -119,12 +119,12 @@ func TestLoadAuth(t *testing.T) {
return cleanup, err
}

err = os.WriteFile(path.Join(authPath, "username"), []byte("testuser"), 0644)
err = os.WriteFile(path.Join(authPath, "username"), []byte("testuser"), 0600)
if err != nil {
return cleanup, err
}

err = os.WriteFile(path.Join(authPath, "password"), []byte("testpassword"), 0644)
err = os.WriteFile(path.Join(authPath, "password"), []byte("testpassword"), 0600)
if err != nil {
return cleanup, err
}
Expand Down Expand Up @@ -182,7 +182,7 @@ func TestLoadAuth(t *testing.T) {
defer cleanup()

// Overwrite username file with empty content
err = os.WriteFile(path.Join(authRoot, "ironic", "username"), []byte(""), 0644)
err = os.WriteFile(path.Join(authRoot, "ironic", "username"), []byte(""), 0600)
if err != nil {
t.Fatalf("Failed to overwrite username file: %v", err)
}
Expand All @@ -202,7 +202,7 @@ func TestLoadAuth(t *testing.T) {
defer cleanup()

// Overwrite password file with empty content
err = os.WriteFile(path.Join(authRoot, "ironic", "password"), []byte(""), 0644)
err = os.WriteFile(path.Join(authRoot, "ironic", "password"), []byte(""), 0600)
if err != nil {
t.Fatalf("Failed to overwrite password file: %v", err)
}
Expand Down

0 comments on commit 099c374

Please sign in to comment.