|
|
@ -196,7 +196,7 @@ func TestSqlCreate(t *testing.T) {
|
|
|
|
sqlCustomLabelsTableKeyColumn,
|
|
|
|
sqlCustomLabelsTableKeyColumn,
|
|
|
|
sqlCustomLabelsTableValueColumn,
|
|
|
|
sqlCustomLabelsTableValueColumn,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
for k, v := range rel.Labels {
|
|
|
|
for k, v := range filterSystemLabels(rel.Labels) {
|
|
|
|
mock.
|
|
|
|
mock.
|
|
|
|
ExpectExec(regexp.QuoteMeta(labelsQuery)).
|
|
|
|
ExpectExec(regexp.QuoteMeta(labelsQuery)).
|
|
|
|
WithArgs(key, rel.Namespace, k, v).
|
|
|
|
WithArgs(key, rel.Namespace, k, v).
|
|
|
@ -478,6 +478,8 @@ func TestSqlDelete(t *testing.T) {
|
|
|
|
WithArgs(key, namespace).
|
|
|
|
WithArgs(key, namespace).
|
|
|
|
WillReturnResult(sqlmock.NewResult(0, 1))
|
|
|
|
WillReturnResult(sqlmock.NewResult(0, 1))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockGetReleaseCustomLabels(mock, key, namespace, rel.Labels)
|
|
|
|
|
|
|
|
|
|
|
|
deleteLabelsQuery := fmt.Sprintf(
|
|
|
|
deleteLabelsQuery := fmt.Sprintf(
|
|
|
|
"DELETE FROM %s WHERE %s = $1 AND %s = $2",
|
|
|
|
"DELETE FROM %s WHERE %s = $1 AND %s = $2",
|
|
|
|
sqlCustomLabelsTableName,
|
|
|
|
sqlCustomLabelsTableName,
|
|
|
|