Skip to content

Commit

Permalink
Revert "txn: remove default values (IBM#219)" (IBM#220)
Browse files Browse the repository at this point in the history
This reverts commit 50f2430.
  • Loading branch information
roytman committed Jun 13, 2021
1 parent 50f2430 commit a6513a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/ovsdb/transact.go
Expand Up @@ -52,7 +52,7 @@ const (
func init() {
fs := flag.NewFlagSet("fs", flag.PanicOnError)
klog.InitFlags(fs)
//fs.Set("v", "10")
fs.Set("v", "10")
}

func isEqualSet(expected, actual interface{}) bool {
Expand Down Expand Up @@ -1686,7 +1686,7 @@ func doInsert(txn *Transaction, ovsOp *libovsdb.Operation, ovsResult *libovsdb.O
key := common.NewDataKey(txn.request.DBName, *ovsOp.Table, uuid)
row := txn.cache.Row(key)
*row = *ovsOp.Row
// txn.schemas.Default(txn.request.DBName, *ovsOp.Table, row)
txn.schemas.Default(txn.request.DBName, *ovsOp.Table, row)
setRowUUID(row, uuid)

err = txn.RowPrepare(tableSchema, txn.mapUUID, ovsOp.Row)
Expand Down
4 changes: 0 additions & 4 deletions pkg/ovsdb/transact_test.go
Expand Up @@ -289,7 +289,6 @@ func TestTransactInsertSimple(t *testing.T) {
table := "table1"
row := map[string]interface{}{
"key1": "val1",
"key2": int(0),
}
req := &libovsdb.Transact{
DBName: "simple",
Expand All @@ -314,7 +313,6 @@ func testTransactInsertSimpleScale(t *testing.T, n int) {
table := "table1"
row := map[string]interface{}{
"key1": "val1",
"key2": int(0),
}
op := libovsdb.Operation{
Op: OP_INSERT,
Expand Down Expand Up @@ -367,7 +365,6 @@ func TestTransactInsertSimpleWithUUID(t *testing.T) {
table := "table1"
row := map[string]interface{}{
"key1": "val1",
"key2": int(0),
}
req := &libovsdb.Transact{
DBName: "simple",
Expand All @@ -393,7 +390,6 @@ func TestTransactInsertSimpleWithUUIDName(t *testing.T) {
table := "table1"
row := map[string]interface{}{
"key1": "val1",
"key2": int(0),
}
uuidName := "myuuid"
req := &libovsdb.Transact{
Expand Down

0 comments on commit a6513a0

Please sign in to comment.