iterx: ErrNotFound for Get only

This commit is contained in:
Michał Matczuk
2017-09-28 15:10:47 +02:00
parent 9604635e8e
commit 3ce82982bb
2 changed files with 25 additions and 19 deletions

View File

@@ -319,8 +319,8 @@ func TestNotFound(t *testing.T) {
t.Run("select", func(t *testing.T) {
var v []NotFoundTable
i := gocqlx.Iter(session.Query(`SELECT * FROM not_found_table`))
if err := i.Select(&v); err != gocql.ErrNotFound {
t.Fatal("expected ErrNotFound", "got", err)
if err := i.Select(&v); err != nil {
t.Fatal(err)
}
if cap(v) > 0 {
t.Fatal("side effect alloc")