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 ...@@ -152,7 +152,7 @@ func (r *sqliteRegistry) Query(ctx context.Context, hostname string) (osladdr st
osladdr = stmt.ColumnText(0) osladdr = stmt.ColumnText(0)
nrow++ nrow++
return nil return nil
}) }, hostname)
if err != nil { if err != nil {
return "", err return "", err
......
...@@ -54,6 +54,7 @@ func TestRegistrySQLite(t *testing.T) { ...@@ -54,6 +54,7 @@ func TestRegistrySQLite(t *testing.T) {
osladdr, err := r.Query(ctx, hostname) osladdr, err := r.Query(ctx, hostname)
if ewant, iserr := expect.(error); iserr { if ewant, iserr := expect.(error); iserr {
// error expected // error expected
// XXX construct full registry error around ewant + reflect.DeepCompare
e, ok := err.(*registryError) e, ok := err.(*registryError)
if !(ok && e.Err == ewant && osladdr == "") { if !(ok && e.Err == ewant && osladdr == "") {
t.Fatalf("%s: query %q:\nwant: \"\", %v\nhave: %q, %v", t.Fatalf("%s: query %q:\nwant: \"\", %v\nhave: %q, %v",
...@@ -85,6 +86,7 @@ func TestRegistrySQLite(t *testing.T) { ...@@ -85,6 +86,7 @@ func TestRegistrySQLite(t *testing.T) {
} }
if ewant != nil { if ewant != nil {
// error expected // error expected
// XXX construct full registry error around ewant + reflect.DeepCompare
e, ok := err.(*registryError) e, ok := err.(*registryError)
if (!ok && e.Err == ewant) { if (!ok && e.Err == ewant) {
t.Fatalf("%s: announce %q %q:\nwant %v\nhave: %v", 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