Skip to content

Commit

Permalink
Move all test data under ./data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sosedoff committed Mar 17, 2015
1 parent cc983f9 commit 14cc8d5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions bookmarks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ func Test_Invalid_Bookmark_Files(t *testing.T) {
_, err := readServerConfig("foobar")
assert.Error(t, err)

_, err = readServerConfig("./fixtures/invalid.toml")
_, err = readServerConfig("./data/invalid.toml")
assert.Error(t, err)
assert.Equal(t, "Near line 1, key 'invalid encoding': Near line 2: Expected key separator '=', but got '\\n' instead.", err.Error())

_, err = readServerConfig("./fixtures/invalid_port.toml")
_, err = readServerConfig("./data/invalid_port.toml")
assert.Error(t, err)
assert.Equal(t, "Type mismatch for 'main.Bookmark.Port': Expected string but found 'int64'.", err.Error())
}

func Test_Bookmark(t *testing.T) {
bookmark, err := readServerConfig("./fixtures/bookmark.toml")
bookmark, err := readServerConfig("./data/bookmark.toml")

assert.Equal(t, nil, err)
assert.Equal(t, "localhost", bookmark.Host)
Expand All @@ -33,7 +33,7 @@ func Test_Bookmark(t *testing.T) {
}

func Test_Bookmark_URL(t *testing.T) {
bookmark, err := readServerConfig("./fixtures/bookmark_url.toml")
bookmark, err := readServerConfig("./data/bookmark_url.toml")

assert.Equal(t, nil, err)
assert.Equal(t, "postgres://username:password@host:port/database?sslmode=disable", bookmark.Url)
Expand Down Expand Up @@ -64,7 +64,7 @@ func Test_ReadBookmarks_Invalid(t *testing.T) {
}

func Test_ReadBookmarks(t *testing.T) {
bookmarks, err := readAllBookmarks("./fixtures")
bookmarks, err := readAllBookmarks("./data")

assert.Equal(t, nil, err)
assert.Equal(t, 2, len(bookmarks))
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func setup() {
os.Exit(1)
}

out, err = exec.Command(testCommands["psql"], "-U", "postgres", "-h", "localhost", "-f", "./sql/booktown.sql", "booktown").CombinedOutput()
out, err = exec.Command(testCommands["psql"], "-U", "postgres", "-h", "localhost", "-f", "./data/booktown.sql", "booktown").CombinedOutput()

if err != nil {
fmt.Println("Database import failed:", string(out))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 14cc8d5

Please sign in to comment.