Refactored Driver, routing specification test

md5sum a.out
7c0042d6b827e86fe52efb4e5beab241  a.out

Modified green-serv.c to not hold the main file so that we can build up
the entire environment without conflicting with a second main function.

Added routing.c which does pretty much the same thing as the routing
test except that we will modify it to check that all endpoints of the
API will delegate to their correct controllers.

Note that we do not check that the response is correct, merely that the
routing is working properly.
Put Comments Spec Test.

md5sum a.out
5caf65ef986b569ed9524a0864cef0e0  a.out

Added simple test to ensure that the PUT request to a comments returns
an unsupported method.
GET Comments spec validation tests.

md5sum a.out
d503e4ca9b18de9089d36fcb6a2988a8  a.out

Testing and ensuring that the comments controller responds to GET with a
proper status code. Have not implemented testing the message body of the
response yet.
Updated GET comments text, added basic getheatmap

md5sum a.out
d503e4ca9b18de9089d36fcb6a2988a8  a.out

Updated the getcomments test text to use the word request instead of
plain, plain being the leftover variable name I had before.

Created spec test of GET heatmap endpoint. 5  Failing tests! This is
exactly what this spec testing is designed to find. This is a good
thing, will continue creating the basic status code tests in order to
catch these for each of the endpoints.

Within the spider testing of the Python API over in the GreenUp
repository, the spider verifies that the responses have a set format,
which is all well and good, but is a massive pain to update. Checking
the C API's responses for consistency in the keys might take a small
amount of effort, but I'm thinking that a simple JSON parser that
creates named tokens, and then checking those tokens against a list of
expected ones should be robust.
Added getpins. Refactored getheatmap spec test

md5sum a.out
d503e4ca9b18de9089d36fcb6a2988a8  a.out

Added beginning tests for pins GET requests, refactored getheatmap to
use a macro to make readability better. Using similar macro in PINS
test. Will refactor the comments spec tests to use a similar one for
consistency.
Refactored getcomments spec test

md5sum a.out
d503e4ca9b18de9089d36fcb6a2988a8  a.out

Changed GET comments spec test to use a macro for easier readability.
GET Pins status checks. Refactor Macro.

md5sum a.out
d503e4ca9b18de9089d36fcb6a2988a8  a.out

Added source file and line number to expected macro output.

Added GET status code checking for pins controller. Some failures, it
seems the offsets are the biggest source of contention for breaking the
specification.
Get Debug Spec test.

md5sum a.out
896566ff2445bb6dcae4a4ae77198852  a.out

Removed fprintf's from reports controller handling the since validation.
Added GET debug.c spec test. Failing on since validation. Will need to
revisit.
Updated EXPECT strings in getdebug

md5sum a.out
896566ff2445bb6dcae4a4ae77198852  a.out

Updated test failure text in getdebug.
PUT Debug spec test.

md5sum a.out
896566ff2445bb6dcae4a4ae77198852  a.out

Spec test to ensure that the PUT-ing to the reports endpoint will result
in a 501 error since the method is not supported.
POST Heatmap spec.

md5sum a.out
896566ff2445bb6dcae4a4ae77198852  a.out

Ensuring that the heatmap does not respond to POST methods.
DELETE Heatmap spec test

md5sum a.out
896566ff2445bb6dcae4a4ae77198852  a.out

Ensure heatmap does not respond to Delete requests.
Comments Delete Spec Test.

Added word of warning about deadlock near the database transaction
functions since shutting off autocommit can result in some problems.
With deleting rows that have been queried for and scanned.

In order to get these spec tests to pass we'll need to switch from using
atol, to using something better like strtol and checking the success of
the conversion, either that or manually looping through the character
array and calling isnum on each one. Either works, one required 2 more
variables and the other requires only a counter, so we'll probably end
up using the loop.
Freed Test string memory

md5sum a.out
0dc2ba2e95b9019dbe957f29178dbf2c  a.out

Even though the spec tests don't really need to worry about not leaking
memory since the process exists as soon as the test is done and the
memory is reclaimed by the system, it doesn't seem right to malloc with
a free.
Delete Debug SPEC Test.

md5sum a.out
0dc2ba2e95b9019dbe957f29178dbf2c  a.out

Reminder, the origin portion of the url is a non-hashed version. The
server stores a hash version for privacy reasons, but the request itself
just needs to send along the regular one.

Last 3 tests for delete spec failing for debug endpoint. This is going
to be fun once I finish writing all my tests and get around to coding
until they all pass with flying colors.
DELETE pins spec test

md5sum a.out
0dc2ba2e95b9019dbe957f29178dbf2c  a.out

Created test to see if pins/markers endpoint works correctly and
according to spec.
PUT Pins Spec check test

md5sum a.out
0dc2ba2e95b9019dbe957f29178dbf2c  a.out

Specification test for the PUT endpoint of the pins/Markers endpoint.
Like a few of the others, the conversions of id's and ensuring
non-numeric values are not allowed is something that is a failing test
right now but will be addressed later on after all the tests are
written.
PUT Heatmap Spec test

md5sum a.out
0dc2ba2e95b9019dbe957f29178dbf2c  a.out

Implementation of Heatmap specification test for the PUT endpoint for
the heatmap. Some failing tests, will address once all status code tests
are implemented.
PUT Heatmap Fix.

md5sum a.out
e9bbcd4d6773af0f590a3ff91fcb8691  a.out

Couldn't help but fix the heatmaps a bit for the put test, now just
getting a database error so its fine and I'll leave it at that (foreign
key constraint)

Updated Macro to spit out the result of the stringToReturn so that
testing is easier to see what might have gone wrong. Becuase of seeing
all the same errors returned I knew there was something up with the JSON
parsing. Fixed, and will need to propagate this change out when doing
test fixes later on.
Tabs vs Spaces?

md5sum a.out
1f61d4cb83e65eaed112f5e0acf295da  a.out

Converted spaces to tabs in putheatmap.c becuase I didn't like the way
it formatted itself on github.