linting fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-12-03 22:59:44 +03:00
parent 7d5bdcf993
commit a1eaf9cc20
41 changed files with 76 additions and 80 deletions

View File

@@ -76,20 +76,20 @@ func TestSQL(t *testing.T) {
records, err = sqlStore.Read("test")
if err != nil {
t.Error(err)
} else {
t.Logf("%# v\n", pretty.Formatter(records))
if string(records[0].Value) != "bar" {
t.Error("Expected bar, got ", string(records[0].Value))
}
}
t.Logf("%# v\n", pretty.Formatter(records))
if string(records[0].Value) != "bar" {
t.Error("Expected bar, got ", string(records[0].Value))
}
time.Sleep(61 * time.Second)
records, err = sqlStore.Read("test")
if err == nil {
_, err = sqlStore.Read("test")
switch err {
case nil:
t.Error("Key test should have expired")
} else {
if err != store.ErrNotFound {
t.Error(err)
}
default:
t.Error(err)
case store.ErrNotFound:
break
}
}