iter: ErrNotFound bug fix
This commit is contained in:
@@ -288,6 +288,16 @@ func TestNotFound(t *testing.T) {
|
||||
Testtext string
|
||||
}
|
||||
|
||||
t.Run("get cql error", func(t *testing.T) {
|
||||
var v NotFoundTable
|
||||
i := gocqlx.Iter(session.Query(`SELECT * FROM not_found_table WRONG`))
|
||||
|
||||
err := i.Get(&v)
|
||||
if err == nil || !strings.Contains(err.Error(), "WRONG") {
|
||||
t.Fatal(err)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("get", func(t *testing.T) {
|
||||
var v NotFoundTable
|
||||
i := gocqlx.Iter(session.Query(`SELECT * FROM not_found_table`))
|
||||
@@ -296,6 +306,16 @@ func TestNotFound(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("select cql error", func(t *testing.T) {
|
||||
var v []NotFoundTable
|
||||
i := gocqlx.Iter(session.Query(`SELECT * FROM not_found_table WRONG`))
|
||||
|
||||
err := i.Select(&v)
|
||||
if err == nil || !strings.Contains(err.Error(), "WRONG") {
|
||||
t.Fatal(err)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("select", func(t *testing.T) {
|
||||
var v []NotFoundTable
|
||||
i := gocqlx.Iter(session.Query(`SELECT * FROM not_found_table`))
|
||||
|
||||
Reference in New Issue
Block a user