fix insert track: return trackId
This commit is contained in:
parent
51401bf909
commit
d870a695f4
1 changed files with 5 additions and 7 deletions
|
@ -66,13 +66,11 @@ func BaseTest(t *testing.T, cfg *sql.Cfg, db *sql.Storage) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TrackingTest(t *testing.T, cfg *sql.Cfg, db *sql.Storage) {
|
func TrackingTest(t *testing.T, cfg *sql.Cfg, db *sql.Storage) {
|
||||||
cont := tracking.Container(db)
|
cont := tracking.SimpleContainer(db)
|
||||||
tracking.Create(cont)
|
cont.CreateTable()
|
||||||
track := tracking.Track{
|
track := tracking.SimpleTrack("t01", "john", lib.Map{})
|
||||||
Head: map[string]string{"taskId": "t01", "userName": "john"},
|
cont.Insert(&track)
|
||||||
Data: lib.Map{},
|
t.AssertEqual(track.TrackId, uint(1))
|
||||||
}
|
|
||||||
tracking.Insert(cont, track)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func MessageTest(t *testing.T, cfg *sql.Cfg, db *sql.Storage) {
|
func MessageTest(t *testing.T, cfg *sql.Cfg, db *sql.Storage) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue