golang/gddo

tests are broken

Opened this issue · 9 comments

tests are broken for the following pkgs:

  • gosrc
  • database

(on master, 2fa0678)
gddo$ go test ./...
# github.com/golang/gddo/gosrc
gosrc/gosrc_test.go:266:63: cannot use testGet (type func(*http.Client, map[string]string, string) (*Directory, error)) as type func(context.Context, *http.Client, map[string]string, string) (*Directory, error) in field value
gosrc/gosrc_test.go:267:14: cannot use testGet (type func(*http.Client, map[string]string, string) (*Directory, error)) as type func(context.Context, *http.Client, map[string]string, string) (*Directory, error) in assignment
gosrc/gosrc_test.go:271:25: not enough arguments in call to getDynamic
have (*http.Client, string, string)
want (context.Context, *http.Client, string, string)
# github.com/golang/gddo/database
database/database_test.go:49:44: unknown field 'AppEngineContext' in struct literal of type Database
database/database_test.go:72:18: not enough arguments in call to db.Put
have (*doc.Package, time.Time, bool)
want (context.Context, *doc.Package, time.Time, bool)
database/database_test.go:75:18: not enough arguments in call to db.Put
have (*doc.Package, time.Time, bool)
want (context.Context, *doc.Package, time.Time, bool)
database/database_test.go:79:55: not enough arguments in call to db.Get
have (string)
want (context.Context, string)
database/database_test.go:99:31: not enough arguments in call to db.Get
have (string)
want (context.Context, string)
database/database_test.go:112:32: not enough arguments in call to db.Get
have (string)
want (context.Context, string)
database/database_test.go:120:44: not enough arguments in call to db.Get
have (string)
want (context.Context, string)
database/database_test.go:160:21: not enough arguments in call to db.Delete
have (string)
want (context.Context, string)
database/database_test.go:166:18: not enough arguments in call to db.Put
have (*doc.Package, time.Time, bool)
want (context.Context, *doc.Package, time.Time, bool)
FAIL github.com/golang/gddo/database [build failed]
ok github.com/golang/gddo/doc 0.087s

cc @shantuo @zombiezen

will assign myself to this issue when i can (need permission)

@adg Coud you add @adams-sarah and @zombiezen to gddo-member?

adg commented

@shantuo was already looking at the build breakage in some capacity, you should coordinate.

oh i've got the fixes in a branch now, but no way to test for sure they work atm.
need an appengine-specific redis server to run the database tests, looks like. or anyway, it's crapping out with my run-of-the-mill redis server and complaining about something appengine.

figured i'd just finish later (wednesday)

@shantuo feel free to take this if you prefer, of course. test fixes were simple/fast.

You should be able to just use normal redis for any test/non-search related functions. I'll check that and fix this.

oh lol. i just saw this and stopped thinking:

second db.Put() returned error database.DeleteIndex: no App Engine endpoint given

This looks like a duplicate of #480. One of the two issues should be closed as dup.

Can't figure out how to properly link the change on gerrit. but here's the WIP https://go-review.googlesource.com/c/gddo/+/73031

It's all yours @shantuo