Commit 2ea061cc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9c017b72
......@@ -152,7 +152,7 @@ func (r *sqliteRegistry) Query(ctx context.Context, hostname string) (osladdr st
osladdr = stmt.ColumnText(0)
nrow++
return nil
})
}, hostname)
if err != nil {
return "", err
......
......@@ -54,6 +54,7 @@ func TestRegistrySQLite(t *testing.T) {
osladdr, err := r.Query(ctx, hostname)
if ewant, iserr := expect.(error); iserr {
// error expected
// XXX construct full registry error around ewant + reflect.DeepCompare
e, ok := err.(*registryError)
if !(ok && e.Err == ewant && osladdr == "") {
t.Fatalf("%s: query %q:\nwant: \"\", %v\nhave: %q, %v",
......@@ -85,6 +86,7 @@ func TestRegistrySQLite(t *testing.T) {
}
if ewant != nil {
// error expected
// XXX construct full registry error around ewant + reflect.DeepCompare
e, ok := err.(*registryError)
if (!ok && e.Err == ewant) {
t.Fatalf("%s: announce %q %q:\nwant %v\nhave: %v",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment