From 6e93d9d018711b6209428c78f6e027e4f727ff60 Mon Sep 17 00:00:00 2001 From: MamoruMurakami Date: Wed, 5 Jul 2017 00:09:05 +0900 Subject: [PATCH] modify cache_test for issues #330 --- cache_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cache_test.go b/cache_test.go index e8671927..636e000f 100644 --- a/cache_test.go +++ b/cache_test.go @@ -15,7 +15,7 @@ func TestCacheFind(t *testing.T) { assert.NoError(t, prepareEngine()) type MailBox struct { - Id int64 + Id int64 `xorm:"pk"` Username string Password string } @@ -27,10 +27,12 @@ func TestCacheFind(t *testing.T) { var inserts = []*MailBox{ { + Id: 0, Username: "user1", Password: "pass1", }, { + Id: 1, Username: "user2", Password: "pass2", }, @@ -63,7 +65,7 @@ func TestCacheFind2(t *testing.T) { assert.NoError(t, prepareEngine()) type MailBox2 struct { - Id uint64 + Id uint64 `xorm:"pk"` Username string Password string } @@ -75,10 +77,12 @@ func TestCacheFind2(t *testing.T) { var inserts = []*MailBox2{ { + Id: 0, Username: "user1", Password: "pass1", }, { + Id: 1, Username: "user2", Password: "pass2", },