mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -8,6 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegrationSQLxApiKeyDataAccess(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
testIntegrationApiKeyDataAccess(t, func(ss db.DB, cfg *setting.Cfg) store {
|
||||
return &sqlxStore{sess: ss.GetSqlxSession(), cfg: cfg}
|
||||
})
|
||||
|
||||
@@ -53,9 +53,8 @@ func seedApiKeys(t *testing.T, store store, num int) {
|
||||
}
|
||||
|
||||
func testIntegrationApiKeyDataAccess(t *testing.T, fn getStore) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
t.Helper()
|
||||
|
||||
mockTimeNow()
|
||||
defer resetTimeNow()
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegrationXORMApiKeyDataAccess(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
testIntegrationApiKeyDataAccess(t, func(ss db.DB, cfg *setting.Cfg) store {
|
||||
return &sqlStore{db: ss, cfg: cfg}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user