Skip to content

Commit

Permalink
Fix test for windows environment (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Michele Catalano <[email protected]>
  • Loading branch information
ironpinguin and Michele Catalano authored Oct 31, 2021
1 parent 21adc5a commit 8961dc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"os"
"path/filepath"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -86,8 +87,8 @@ func TestBackend_getTfstateFilename(t *testing.T) {
args args
want string
}{
{"get file name without extension", fields{"/tmp/"}, args{"the_file"}, "/tmp/the_file.tfstate"},
{"get file name with extension", fields{"/tmp/"}, args{"otherfile.tfstate"}, "/tmp/otherfile.tfstate"},
{"get file name without extension", fields{"/tmp/"}, args{"the_file"}, filepath.Join("/tmp/", "the_file.tfstate")},
{"get file name with extension", fields{"/tmp/"}, args{"otherfile.tfstate"}, filepath.Join("/tmp/", "otherfile.tfstate")},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/spf13/viper"
)

// Config used to load configuration
type Config struct {
storageDirectory string
authEnabled bool
Expand Down

0 comments on commit 8961dc6

Please sign in to comment.