Code Monkey home page Code Monkey logo

gae-go-testing's Introduction

gae-go-testing

Testing library for Go App Engine, giving you an appengine.Context fake that forwards to a dev_appserver.py child process. This library is fixed for go1 based on http://code.google.com/p/gae-go-testing/ . This library works on GAE/G 1.7.0 or higher and go1 and tested on:

* GAE/G 1.7.0, go 1.0.2
* GAE/G 1.7.1, go 1.0.2

Installation

Set environment variables :

export APPENGINE_SDK=/usr/local/google_appengine
export PATH=$PATH:$APPENGINE_SDK

Before installing this library, you have to install appengine SDK. And copy appengine, appengine_internal and goprotobuf as followings :

curl https://raw.github.com/tenntenn/gae-go-testing/master/setup.py | python

This library can be installed as following :

$go get github.com/tenntenn/gae-go-testing

Usage

context_test.go and recorder_test.go show an example of usage.

gae-go-testing's People

Contributors

kylefinley avatar tenntenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gae-go-testing's Issues

Call() has wrong signature for 1.7.1

I believe the signature for Call changed in 1.7.1. I'm receiving the error:
have Call(string, string, interface {}, interface {}, *appengine_internal.CallOptions) error
want Call(string, string, proto.Message, proto.Message, *appengine_internal.CallOptions) error

Looking at the code, it appears Call has not been updated for 1.7.1.

Prematurely closed connection

When running tests (even those defined in this package), tests routinely fail with use of closed network connection. This appears to be a race condition (it doesn't always happen at the same place, but anything that uses APIs like memcache or datastore eventually hits it) and I cannot track it down. I'm running SDK 1.7.1, go 1.0.2, on Linux.

How do I get this running?

Greetings! I am trying to get gae-go-testing working, but I have been unsuccessful so far.

My environment is as follows:

GAE is installed in: $HOME/AppEngine/google_appengine

I use this bash function to setup my GAE environment when developing GAE apps:

function setup_appengine(){
  export APPENGINE_SDK="$HOME/AppEngine/google_appengine"
  export PATH="$APPENGINE_SDK":"$PATH"
}

After running that function, my go env is:

GOROOT="/Users/tylerb/AppEngine/google_appengine/goroot"
GOBIN=""
GOARCH="amd64"
GOCHAR="6"
GOOS="darwin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOTOOLDIR="/Users/tylerb/AppEngine/google_appengine/goroot/pkg/tool/darwin_amd64"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
CGO_ENABLED="1"

echo $APPENGINE_SDK shows:

/Users/tylerb/AppEngine/google_appengine

When I attempt to run the python installation script, it fails with this error:

Traceback (most recent call last):
  File "<stdin>", line 55, in <module>
  File "<stdin>", line 49, in main
OSError: [Errno 13] Permission denied: '/usr/local/go/src/pkg/appengine'

I don't even have a /usr/local/go/src/pkg/appengine file or folder. What is wrong? How do I fix this?

Thanks!! :)

-Tyler

Still generating api_version 3?

Sorry to bother you, but I found this updated gae-go-testing library and have been trying to use it. Unfortunately, no matter what I do the app.yaml that is generated continues to have api_version 3 in it! Do you have any idea why this might be?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.