Skip to content

Commit

Permalink
Updates based on code review
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
  • Loading branch information
kozlovic committed Feb 2, 2022
1 parent 05a456d commit 279ec83
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func createConfFile(t *testing.T, content []byte) string {
}

func shutdownJSServerAndRemoveStorage(t *testing.T, s *server.Server) {
t.Helper()
var sd string
if config := s.JetStreamConfig(); config != nil {
sd = config.StoreDir
Expand Down
4 changes: 0 additions & 4 deletions nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ func TestExpandPath(t *testing.T) {
{path: "/Foo/Bar", userProfile: `C:\Foo\Bar`, wantPath: "/Foo/Bar"},
{path: "Foo/Bar", userProfile: `C:\Foo\Bar`, wantPath: "Foo/Bar"},
{path: "~/Fizz", userProfile: `C:\Foo\Bar`, wantPath: `C:\Foo\Bar\Fizz`},
// That one would fail because expandPath(), if not finding `~` returns
// the given path, which since ${HOMEDRIVE}${HOMEPATH} is not set,
// would return `\Fizz` but test expects `C:\Foo\Bar\Fizz`?
// {path: `${HOMEDRIVE}${HOMEPATH}\Fizz`, userProfile: `C:\Foo\Bar`, wantPath: `C:\Foo\Bar\Fizz`},

// Missing USERPROFILE.
{path: "~/Fizz", homeDrive: "X:", homePath: `\Foo\Bar`, wantPath: `X:\Foo\Bar\Fizz`},
Expand Down
1 change: 1 addition & 0 deletions test/js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
)

func shutdownJSServerAndRemoveStorage(t *testing.T, s *server.Server) {
t.Helper()
var sd string
if config := s.JetStreamConfig(); config != nil {
sd = config.StoreDir
Expand Down

0 comments on commit 279ec83

Please sign in to comment.