favclip / testerator

test accelerator for appengine/go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use of internal package

wolfgangmeyers opened this issue · comments

Any progress on resolving this? Is it possible to work around the internal package issue?

$ go get github.com/favclip/testerator
package github.com/favclip/testerator
    imports google.golang.org/appengine/internal/search: use of internal package not allowed

Also, have you considered creating a pull request to the main codebase?

thank you for your comment. we've missed this issue.
Unfortunately, we don't have good ideas for this issue.
testerator have to remove all Search API document. but appengine sdk does not provide something like search.GetAllIndex(c) api... 😢

testerator/testarator.go

Lines 192 to 195 in d90ba6c

indexNames := make(map[string]bool, 0)
for _, req := range s.searchIndexDocumentRequests {
indexNames[*req.GetParams().GetIndexSpec().Name] = true
}

because, we are forced to use appengine.WithAPICallFunc and cast to searchpb.IndexDocumentRequest. it is struct of internal package. 😭

do you know any good solutions?

https://github.com/golang/appengine/blob/6a436539be38c296a8075a871cc536686b458371/search/search.go#L8
https://code.google.com/p/googleappengine/issues/detail?id=12417

It solved on master/HEAD.

please add below import statement

    _ "github.com/favclip/testerator/datastore"
    _ "github.com/favclip/testerator/memcache"
    _ "github.com/favclip/testerator/search"