Skip to content

Commit a832dd2

Browse files
committed
WIP
1 parent 41db0a5 commit a832dd2

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

cmd/routing-api/main_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ var _ = Describe("Main", func() {
245245
gormDB, err = gorm.Open(getGormDialect(rapiConfig.SqlDB.Type, connectionString), &gorm.Config{})
246246
Expect(err).NotTo(HaveOccurred())
247247
})
248-
AfterEach(func() {
249-
gormDB.AutoMigrate(&models.RouterGroupDB{})
250-
Expect(os.Remove(configPath)).To(Succeed())
251-
})
248+
/* AfterEach(func() {
249+
gormDB.AutoMigrate(&models.RouterGroupDB{})
250+
Expect(os.Remove(configPath)).To(Succeed())
251+
})*/
252252
It("should fail with an error", func() {
253253
routingAPIRunner := testrunner.New(routingAPIBinPath, routingAPIArgs)
254254
proc := ifrit.Invoke(routingAPIRunner)

cmd/routing-api/routing_api_suite_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ var (
6464
mtlsAPIClientCert tls.Certificate
6565
)
6666

67-
func TestMain(m *testing.M) {
67+
func TestMainSuite(t *testing.T) {
6868
RegisterFailHandler(Fail)
69-
os.Exit(m.Run())
70-
//TODO Adapt the test execution
71-
RunSpecs(m, "Main Suite")
69+
suiteConfig, reporterConfig := GinkgoConfiguration()
70+
RunSpecs(t, "Main Suite", suiteConfig, reporterConfig)
7271
}
7372

7473
var _ = SynchronizedBeforeSuite(
@@ -82,7 +81,6 @@ var _ = SynchronizedBeforeSuite(
8281
return []byte(strings.Join([]string{routingAPIBin, locketPath}, ","))
8382
},
8483
func(binPaths []byte) {
85-
//TODO Adapt the logger
8684
grpclog.SetLoggerV2(grpclog.NewLoggerV2(io.Discard, io.Discard, io.Discard))
8785

8886
path := string(binPaths)

migration/V2_update_rg_migration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (v *V2UpdateRgMigration) Version() int {
2020
func (v *V2UpdateRgMigration) Run(sqlDB *db.SqlDB) error {
2121
type routerGroup struct {
2222
models.Model
23-
Name string `gorm:"index:idx_rg_name,unique" json:"name"`
23+
Name string `gorm:"size:255;index:idx_rg_name,unique" json:"name"`
2424
}
2525
return sqlDB.Client.AddUniqueIndex("idx_rg_name", &routerGroup{})
2626
}

0 commit comments

Comments
 (0)