Skip to content

Commit

Permalink
Fix sql syntax for UpdateAlgorithmExtraSettings (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
hougangliu authored and k8s-ci-robot committed Jun 5, 2019
1 parent 77ae12d commit 2d059a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/db/v1alpha2/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (d *dbConn) UpdateAlgorithmExtraSettings(experimentName string, extraAlgori
isin := false
for _, ceas := range aesList {
if ceas.Name == neas.Name {
_, err = d.db.Exec(`UPDATE extra_algorithm_settings SET value = ? ,
_, err = d.db.Exec(`UPDATE extra_algorithm_settings SET value = ?
WHERE experiment_name = ? AND setting_name = ?`,
neas.Value, experimentName, ceas.Name)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/db/v1alpha2/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func TestUpdateAlgorithmExtraSettings(t *testing.T) {
),
)

mock.ExpectExec(`UPDATE extra_algorithm_settings SET value = \? ,
mock.ExpectExec(`UPDATE extra_algorithm_settings SET value = \?
WHERE experiment_name = \? AND setting_name = \?`,
).WithArgs(exAlgoSet[0].Value, exp_name, exAlgoSet[0].Name).WillReturnResult(sqlmock.NewResult(1, 1))

Expand Down

0 comments on commit 2d059a4

Please sign in to comment.