Skip to content

Commit 5129df7

Browse files
committed
chore: add test labels
1 parent 039f4fd commit 5129df7

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

migrate/migrate.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/flanksource/commons/collections"
1313
"github.com/flanksource/commons/logger"
14+
"github.com/flanksource/commons/properties"
1415
"github.com/flanksource/duty/db"
1516
"github.com/flanksource/duty/functions"
1617
"github.com/flanksource/duty/schema"
@@ -25,6 +26,10 @@ type MigrateOptions struct {
2526
func RunMigrations(pool *sql.DB, connection string, opts MigrateOptions) error {
2627
l := logger.GetLogger("migrate")
2728

29+
if properties.On(false, "db.migrate.skip") {
30+
return nil
31+
}
32+
2833
if connection == "" {
2934
return errors.New("connection string is empty")
3035
}

tests/schema_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
. "github.com/onsi/gomega"
1010
)
1111

12-
var _ = ginkgo.Describe("Schema", func() {
12+
var _ = ginkgo.Describe("Schema", ginkgo.Label("slow"), func() {
1313
ginkgo.It("should be able to run migrations", func() {
1414
logger.Infof("Running migrations against %s", setup.PgUrl)
1515
// run migrations again to ensure idempotency

tests/upstream_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/flanksource/duty/upstream"
2020
)
2121

22-
var _ = ginkgo.Describe("Reconcile Test", ginkgo.Ordered, func() {
22+
var _ = ginkgo.Describe("Reconcile Test", ginkgo.Ordered, ginkgo.Label("slow"), func() {
2323
var upstreamCtx *context.Context
2424
var echoCloser, drop func()
2525
var upstreamConf upstream.UpstreamConfig

0 commit comments

Comments
 (0)