Skip to content

Commit

Permalink
Fix failing tests from permission migration
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkeitel committed Mar 12, 2018
1 parent 11febbd commit f598a41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/common/schema.go
Expand Up @@ -68,6 +68,9 @@ var (
"valid_start",
"valid_end",
"valid_forever",
"ui_group",
"api_group",
"allow_status_api",
}

SessionTableCols = []string{
Expand Down
4 changes: 2 additions & 2 deletions src/server/routes_test.go
Expand Up @@ -23,7 +23,7 @@ func TestRootHandlerLoggedInNormal(t *testing.T) {
defer db.Close()

userRow := sqlmock.NewRows(common.UserTableCols).AddRow(
1, "testUser", "", 0, 0, 0, 1, 1, 1, 0, 0,
1, "testUser", "", 0, 0, 0, 1, 1, 1, 0, 0, "default", "disable", false,
)

mock.ExpectQuery("SELECT .*? FROM \"user\"").WithArgs("testuser").WillReturnRows(userRow)
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestRootHandlerLoggedInAdmin(t *testing.T) {
defer db.Close()

userRow := sqlmock.NewRows(common.UserTableCols).AddRow(
1, "testUser", "", 0, 0, 0, 1, 1, 1, 0, 0,
1, "testUser", "", 0, 0, 0, 1, 1, 1, 0, 0, "admin", "disable", false,
)

mock.ExpectQuery("SELECT .*? FROM \"user\"").WithArgs("testuser").WillReturnRows(userRow)
Expand Down

0 comments on commit f598a41

Please sign in to comment.