Skip to content

Commit 9448b17

Browse files
committed
feat: Update the gitignore file to ignore changed go.mod and go.sum files. Use the vendors instead of the root dependencies
1 parent ed1d830 commit 9448b17

12 files changed

Lines changed: 2 additions & 22 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
go.mod
2+
go.sum
23
tags
34
cmd/routing-api/routing-api
45
/routing-api

cmd/routing-api/routing_api_suite_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ var _ = SynchronizedBeforeSuite(
7070
Expect(err).NotTo(HaveOccurred())
7171

7272
locketPath, err := gexec.Build("code.cloudfoundry.org/locket/cmd/locket", "-race")
73-
if err != nil {
74-
// If building locket fails due to missing dependencies, skip the test
75-
Skip(fmt.Sprintf("Skipping test suite: locket dependency issue - %v", err))
76-
}
73+
Expect(err).NotTo(HaveOccurred())
7774

7875
return []byte(strings.Join([]string{routingAPIBin, locketPath}, ","))
7976
},
@@ -82,9 +79,6 @@ var _ = SynchronizedBeforeSuite(
8279

8380
path := string(binPaths)
8481
parts := strings.Split(path, ",")
85-
if len(parts) < 2 || parts[1] == "" {
86-
Skip("Skipping test suite: locket binary not available")
87-
}
8882
routingAPIBinPath = parts[0]
8983
locketBinPath = parts[1]
9084

db/db_sql.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ func NewSqlDB(cfg *config.SqlDB) (*SqlDB, error) {
128128
return nil, err
129129
}
130130

131-
// Use the connection pool and setup it
132131
sqlDB, err := db.DB()
133132
if err != nil {
134133
return nil, err

db/db_sql_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,13 +2085,10 @@ var _ = Describe("SqlDB", func() {
20852085
It("eventually resolves the issue", func() {
20862086
timeout := 10.0
20872087

2088-
// Verify successful pruning starts working
20892088
Eventually(logger, timeout).Should(gbytes.Say(`"prune.successfully-finished-pruning-tcp-routes","log_level":1,"data":{"rowsAffected":1}`))
20902089

2091-
// Verify errors occur
20922090
Eventually(logger, timeout).Should(gbytes.Say(`failed-to-prune-tcp-routes","log_level":2,"data":{"error":"temp-error"}`))
20932091

2094-
// Verify recovery with more rows
20952092
Eventually(logger, timeout).Should(gbytes.Say(`"prune.successfully-finished-pruning-tcp-routes","log_level":1,"data":{"rowsAffected":111}`))
20962093
})
20972094
})

db/fakes/fake_client.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

migration/V2_update_rg_migration.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ func (v *V2UpdateRgMigration) Run(sqlDB *db.SqlDB) error {
2727
return err
2828
}
2929

30-
// Check for duplicates
3130
nameMap := make(map[string]int)
3231
for _, rg := range rgs {
3332
nameMap[rg.Name]++
@@ -39,7 +38,6 @@ func (v *V2UpdateRgMigration) Run(sqlDB *db.SqlDB) error {
3938
}
4039
}
4140

42-
// Remove old index if it exists
4341
dropIndex(sqlDB, "idx_rg_name", "router_groups")
4442

4543
// Create unique index - MySQL requires length prefix for text columns

migration/V2_update_rg_migration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ var _ = Describe("V2UpdateRgMigration", func() {
5555
})
5656

5757
It("does not allow duplicate router group names", func() {
58-
// Verify that the unique index was created
5958
migrator := sqlDB.Client.Migrator()
6059
hasIndex := migrator.HasIndex("router_groups", "idx_rg_name")
6160
Expect(hasIndex).To(BeTrue(), "Index idx_rg_name should exist on router_groups table")

migration/V4_add_rg_uniq_idx_tcp_route_migration.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ func (v *V4AddRgUniqIdxTCPRoute) Version() int {
1717
}
1818

1919
func (v *V4AddRgUniqIdxTCPRoute) Run(sqlDB *db.SqlDB) error {
20-
// Drop existing index if it exists
2120
dropIndex(sqlDB, "idx_tcp_route", "tcp_routes")
2221

2322
// Create unique index - MySQL requires length prefixes for text columns

migration/V5_sni_hostname_migration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ var _ = Describe("V5SniHostnameMigration", func() {
7878
})
7979

8080
It("denies adding the same TCP routes with same SNI hostnames", func() {
81-
// Verify that the unique index was created
8281
migrator := sqlDB.Client.Migrator()
8382
hasIndex := migrator.HasIndex("tcp_routes", "idx_tcp_route")
8483
Expect(hasIndex).To(BeTrue(), "Index idx_tcp_route should exist on tcp_routes table")

migration/V6_tls_tcp_route.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ func (v *V6TCPTLSRoutes) Run(sqlDB *db.SqlDB) error {
2323
return err
2424
}
2525

26-
// Drop existing index if it exists
2726
dropIndex(sqlDB, "idx_tcp_route", "tcp_routes")
2827

2928
// Create unique index - MySQL requires length prefixes for text columns

0 commit comments

Comments
 (0)