diff --git a/ldb/insertremove_test.go b/ldb/insertremove_test.go index fadf4799..b5ce2dc5 100644 --- a/ldb/insertremove_test.go +++ b/ldb/insertremove_test.go @@ -22,7 +22,7 @@ func loadblocks(t *testing.T) []*btcutil.Block { return tstBlocks } - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if err != nil { t.Errorf("Unable to load blocks from test data: %v", err) diff --git a/ldb/operational_test.go b/ldb/operational_test.go index 0eab65e9..89fb1425 100644 --- a/ldb/operational_test.go +++ b/ldb/operational_test.go @@ -65,7 +65,7 @@ func testOperationalMode(t *testing.T, mode int) { db.SetDBInsertMode(btcdb.InsertValidatedInput) } - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if err != nil { t.Errorf("Unable to load blocks from test data for mode %v: %v", @@ -185,7 +185,7 @@ func testBackout(t *testing.T, mode int) { } - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if len(blocks) < 120 { t.Errorf("test data too small") @@ -274,7 +274,7 @@ func loadBlocks(t *testing.T, file string) (blocks []*btcutil.Block, err error) blocks = savedblocks return } - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") var dr io.Reader var fi io.ReadCloser fi, err = os.Open(testdatafile) diff --git a/sqlite3/insertfail_test.go b/sqlite3/insertfail_test.go index 4c27e2c8..391c3146 100644 --- a/sqlite3/insertfail_test.go +++ b/sqlite3/insertfail_test.go @@ -58,7 +58,7 @@ func failtestOperationalMode(t *testing.T, mode int) { sqlite3.SetBlockCacheSize(db, 2) sqlite3.SetTxCacheSize(db, 3) - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if err != nil { t.Errorf("Unable to load blocks from test data for mode %v: %v", diff --git a/sqlite3/insertremove_test.go b/sqlite3/insertremove_test.go index c49595c6..4b0f586e 100644 --- a/sqlite3/insertremove_test.go +++ b/sqlite3/insertremove_test.go @@ -21,7 +21,7 @@ func loadblocks(t *testing.T) []*btcutil.Block { return tstBlocks } - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if err != nil { t.Errorf("Unable to load blocks from test data: %v", err) diff --git a/sqlite3/operational_test.go b/sqlite3/operational_test.go index b9eba899..da73a962 100644 --- a/sqlite3/operational_test.go +++ b/sqlite3/operational_test.go @@ -71,7 +71,7 @@ func testOperationalMode(t *testing.T, mode int) { sqlite3.SetBlockCacheSize(db, 2) sqlite3.SetTxCacheSize(db, 3) - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if err != nil { t.Errorf("Unable to load blocks from test data for mode %v: %v", @@ -196,7 +196,7 @@ func testBackout(t *testing.T, mode int) { sqlite3.SetBlockCacheSize(db, 2) sqlite3.SetTxCacheSize(db, 3) - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") blocks, err := loadBlocks(t, testdatafile) if len(blocks) < 120 { t.Errorf("test data too small") @@ -275,7 +275,7 @@ func testBackout(t *testing.T, mode int) { } func loadBlocks(t *testing.T, file string) (blocks []*btcutil.Block, err error) { - testdatafile := filepath.Join("testdata", "blocks1-256.bz2") + testdatafile := filepath.Join("..", "testdata", "blocks1-256.bz2") var dr io.Reader var fi io.ReadCloser fi, err = os.Open(testdatafile) diff --git a/sqlite3/testdata/blocks1-256.bz2 b/sqlite3/testdata/blocks1-256.bz2 deleted file mode 100644 index 6b8bda44..00000000 Binary files a/sqlite3/testdata/blocks1-256.bz2 and /dev/null differ diff --git a/ldb/testdata/blocks1-256.bz2 b/testdata/blocks1-256.bz2 similarity index 100% rename from ldb/testdata/blocks1-256.bz2 rename to testdata/blocks1-256.bz2