Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper GOPATH to include App Engine libraries from App Engine SDK?

I'm trying to write an app for App Engine using the Go SDK, but it seems to have a funny relationship to unit testing. People have written libraries around this original, outdated set of tools, but every time I try to install them, depending on the Go command I use I run into one of two problems:

  • From the standard go: Can't locate 'appengine' or 'appengine_internal'
  • From the SDK's go: not allowed to build packages. I doubt I'm supposed to be using this.

My guess is that I have to manipulate my $GOPATH to include a directory somewhere in the SDK so that the appengine packages are visible, but I've tried many variations (such as $SDK/goroot, $SDK/goroot/src, etc.) and none of them seem to work.

-Generally-, what testing strategies might one suggest for App Engine for Go?

-Specifically-, how can I go about making those packages visible so that I may use the general Go tool to install libraries that depend on them (such as these testing packages) or otherwise run my own test suites?

like image 604
pablo.meier Avatar asked Feb 26 '13 22:02

pablo.meier


1 Answers

This answer provides detailed installation instructions for the updated gae-go-testing. I did a quick run through and they do seem to work. Note that installation involves copying across appengine, appengine_internal and goprotobuf from the SDK to your local go install.

like image 152
Rich Churcher Avatar answered Nov 16 '22 02:11

Rich Churcher