Closed naota closed 10 years ago
And please document the official way to run tests, probably in README.rst
It would be probably good to make sure the migrations are run automatically on startup only in Development environment in the future.
I'm getting some warnings about redundant imports when running tests. Otherwise pretty cool, works as advertised and tests are passing.
Most of the issues I raised are either invalid or can be fixed later besides the needless static/html files. Please clean those up and I will merge.
please rebase -i to squash the appropriate commits so the additions/deletions don't get into history.
yac@rainbowdash % .cabal-sandbox/bin/yesod test
Resolving dependencies...
Configuring GenTwoo-backend-0.1.0...
Building GenTwoo-backend-0.1.0...
Preprocessing library GenTwoo-backend-0.1.0...
In-place registering GenTwoo-backend-0.1.0...
Preprocessing test suite 'test' for GenTwoo-backend-0.1.0...
Linking dist/build/test/test ...
Building GenTwoo-backend-0.1.0...
Preprocessing library GenTwoo-backend-0.1.0...
In-place registering GenTwoo-backend-0.1.0...
Preprocessing test suite 'test' for GenTwoo-backend-0.1.0...
Linking dist/build/test/test ...
Running 1 test suites...
Test suite test: RUNNING...
Test suite test: PASS
Test suite logged to: dist/test/GenTwoo-backend-0.1.0-test.log
1 of 1 test suites (1 of 1 test cases) passed.
yac@rainbowdash % curl -d '{"uuid": "9cc7f702-bd25-4d1b-9da1-af8d70549500"}' localhost:3000/v0/register
{"status":"registered"}% --------------------------------------------------------------------------------
~
yac@rainbowdash % curl -d '{"uuid": "9cc7f702-bd25-4d1b-9da1-af8d70549500"}' localhost:3000/v0/register
<!DOCTYPE html>
<html><head><title>Permission Denied</title></head><body><h1>Permission denied</h1>
<p>Specified UUID already exist</p>
</body></html>% --------------------------------------------------------------------------------
~
yac@rainbowdash % curl -d '{"uuid2": "9cc7f702-bd25-4d1b-9da1-af8d70549500"}' localhost:3000/v0/register
<!DOCTYPE html>
<html><head><title>Invalid Arguments</title></head><body><h1>Invalid Arguments</h1>
<ul><li>The key "uuid" was not found</li>
</ul>
</body></html>% --------------------------------------------------------------------------------
~
yac@rainbowdash % curl -d '' localhost:3000/v0/register
<!DOCTYPE html>
<html><head><title>Invalid Arguments</title></head><body><h1>Invalid Arguments</h1>
<ul><li>ParseError {errorContexts = ["demandInput"], errorMessage = "not enough bytes", errorPosition = 1:1}</li>
</ul>
</body></html>%
This pull request implement application's base layout and register rpc call.
These three commits are important:
Some test results: