Skip to content

Commit

Permalink
Work in review-suggestions;
Browse files Browse the repository at this point in the history
  • Loading branch information
joergdw committed Aug 16, 2024
1 parent 3edc13f commit a28998e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/autoscaler/cred_helper/storedprocedure_cred_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (c *storedProcedureCredentials) Create(ctx context.Context, appId string, u
var count int
var cred *models.Credential

// ⛔ Be aware that the subesquent line is a fatal programming error. We have never written into
// ⛔ Be aware that the subsequent line is a fatal programming error. We have never written into
// that table the correct binding-id and instance-id. So this table has been filled since the
// going-live of commit “a50665290878eaf9c21c0ae368f9d0100c185fdc” with lines where each colum
// actually contains the app-id.
Expand Down
2 changes: 1 addition & 1 deletion src/autoscaler/db/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var _ = Describe("Helper", func() {
Expect(database).To(Equal(&Database{
DriverName: "mysql",
DataSourceName: "root@tcp(localhost:3306)/autoscaler?parseTime=true",
OTELAttribute: semconv.DBSystemMySQL,
OTELAttribute: semconv.DBSystemMySQL,
}))
})

Expand Down
2 changes: 1 addition & 1 deletion src/autoscaler/db/sqldb/storedprocedure_sqldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (sdb *StoredProcedureSQLDb) ValidateCredentials(ctx context.Context, creds
// “cred_helper/storedprocedure_cred_helper.go” – we store in each column just the corresponding
// app_id. To “mark that”, we use here the `as app_id`-renaming.
query := fmt.Sprintf(
"SELECT instance_id as app_id, binding_id from %s($1,$2) WHERE app_id = $3",
"SELECT instance_id as app_id, binding_id from %s($1,$2) WHERE binding_id = $3",
procedureIdentifier.Sanitize())
err := sdb.sqldb.QueryRow(ctx, query, creds.Username, creds.Password, appId).
Scan(&credOptions.InstanceId, &credOptions.BindingId)
Expand Down
12 changes: 6 additions & 6 deletions src/changeloglockcleaner/sqldb/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ var _ = Describe("Helper", func() {
It("returns mysql database object", func() {
Expect(err).NotTo(HaveOccurred())
Expect(database).To(Equal(&Database{
DriverName: "mysql",
DataSourceName: "root@tcp(localhost:3306)/autoscaler?parseTime=true&tls=preferred",
DriverName: "mysql",
DataSourceName: "root@tcp(localhost:3306)/autoscaler?parseTime=true&tls=preferred",
}))
})
})
Expand All @@ -39,8 +39,8 @@ var _ = Describe("Helper", func() {
It("returns mysql database object", func() {
Expect(err).NotTo(HaveOccurred())
Expect(database).To(Equal(&Database{
DriverName: "mysql",
DataSourceName: "root@tcp(localhost:3306)/autoscaler?parseTime=true",
DriverName: "mysql",
DataSourceName: "root@tcp(localhost:3306)/autoscaler?parseTime=true",
}))
})

Expand All @@ -63,8 +63,8 @@ var _ = Describe("Helper", func() {
It("returns postgres database object", func() {
Expect(err).NotTo(HaveOccurred())
Expect(database).To(Equal(&Database{
DriverName: "pgx",
DataSourceName: "postgres://postgres:password@localhost:5432/autoscaler?sslmode=disable",
DriverName: "pgx",
DataSourceName: "postgres://postgres:password@localhost:5432/autoscaler?sslmode=disable",
}))
})
})
Expand Down

0 comments on commit a28998e

Please sign in to comment.