Skip to content

Commit

Permalink
Merge pull request #413 from hellofresh/hotfix/package-name-in-path-2
Browse files Browse the repository at this point in the history
PT-5117 Fixed one more test to be compatible with go modules
  • Loading branch information
vgarvardt authored Aug 27, 2019
2 parents 643b6ab + 366807d commit 5fafac7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/plugin/oauth2/file_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestNewFileSystemRepository(t *testing.T) {
wd, err := os.Getwd()
assert.NoError(t, err)
assert.Contains(t, wd, "github.com/hellofresh/janus")

// .../github.com/hellofresh/janus/pkg/api/../../assets/auth
// ./../../assets/auth
exampleAPIsPath := filepath.Join(wd, "..", "..", "..", "assets", "stubs", "auth")
info, err := os.Stat(exampleAPIsPath)
assert.NoError(t, err)
assert.True(t, info.IsDir())
require.NoError(t, err)
require.True(t, info.IsDir())

fsRepo, err := NewFileSystemRepository(exampleAPIsPath)
assert.NoError(t, err)
require.NoError(t, err)
assert.NotNil(t, fsRepo)
}

0 comments on commit 5fafac7

Please sign in to comment.