Skip to content

Commit

Permalink
fixed unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
  • Loading branch information
nyrahul committed Jan 24, 2022
1 parent 4ff63ef commit 300e32c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ policies/*.yaml
!policies/.keep
tests/mysql/logs
src/dist/
src/coverage.out
src/report.json
src/coverage*.out
src/report*.json
4 changes: 2 additions & 2 deletions src/libs/dbHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestGetNetworkPolicies(t *testing.T) {
mock.ExpectQuery("^SELECT (.+) FROM network_policy*").
WillReturnRows(rows)

results := GetNetworkPolicies(types.ConfigDB{DBDriver: "mysql", TableNetworkPolicy: "network_policy"}, "", "", "")
results := GetNetworkPolicies(types.ConfigDB{DBDriver: "mysql"}, "", "", "")
assert.Equal(t, results[0].Kind, "test")

if err := mock.ExpectationsWereMet(); err != nil {
Expand Down Expand Up @@ -91,7 +91,7 @@ func TestInsertNetworkPolicies(t *testing.T) {
},
}

err := InsertNetworkPoliciesToMySQL(types.ConfigDB{DBDriver: "mysql", TableNetworkPolicy: "network_policy"}, nfe)
err := InsertNetworkPoliciesToMySQL(types.ConfigDB{DBDriver: "mysql"}, nfe)
assert.NoError(t, err)

if err := mock.ExpectationsWereMet(); err != nil {
Expand Down

0 comments on commit 300e32c

Please sign in to comment.