Skip to content

Commit

Permalink
missing test for no-partition case
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Nov 11, 2019
1 parent b577e5f commit e6e6af7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func TestCache_Scopes(t *testing.T) {
})
assert.Nil(t, err)
assert.Equal(t, "value-upd", string(res), "was deleted, update")

assert.Equal(t, CacheStat{Hits: 1, Misses: 3, Keys: 2, Size: 0, Errors: 0}, lc.Stat())
}

func TestCache_Flush(t *testing.T) {
Expand Down Expand Up @@ -130,6 +132,10 @@ func TestScope_Key(t *testing.T) {
})
}

// without partition
k := NewKey().ID("id1").Scopes("s1", "s2")
assert.Equal(t, "@@id1@@s1$$s2", k.String())

// parse invalid key strings
_, err := parseKey("abc")
assert.Error(t, err)
Expand Down

0 comments on commit e6e6af7

Please sign in to comment.