Build: clean up and document integration test convention (#58170)
* clean up and document integration test convention * clarify integration test conventions * clean up integration tests that don't follow convention * mark testIntegration* functions as helpers to avoid confusion
This commit is contained in:
@@ -7,6 +7,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegrationSQLxUserStarsDataAccess(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
testIntegrationUserStarsDataAccess(t, func(ss db.DB) store {
|
||||
return &sqlxStore{sess: ss.GetSqlxSession()}
|
||||
})
|
||||
|
||||
@@ -13,9 +13,8 @@ import (
|
||||
type getStore func(db.DB) store
|
||||
|
||||
func testIntegrationUserStarsDataAccess(t *testing.T, fn getStore) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
t.Helper()
|
||||
|
||||
t.Run("Testing User Stars Data Access", func(t *testing.T) {
|
||||
ss := db.InitTestDB(t)
|
||||
starStore := fn(ss)
|
||||
|
||||
@@ -7,6 +7,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegrationXormUserStarsDataAccess(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
testIntegrationUserStarsDataAccess(t, func(ss db.DB) store {
|
||||
return &sqlStore{db: ss}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user