1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-27 16:02:27 -05:00
Commit Graph

274 Commits

Author SHA1 Message Date
144c89655a
Merge pull request #26 from aclindsa/postgres
Postgres Support
2017-11-17 08:05:35 -05:00
b2359e1267 Fixup account transactions to work for both Postgres and MySQL 2017-11-17 05:50:00 -05:00
d5bb6ae26c .travis.yml: Enable postgres 2017-11-17 05:20:10 -05:00
50dd7b1d26 testing: Use Time.Equal for date comparisons
Postgres actually preserves the timezone, unlike sqlite and mysql...
2017-11-17 05:20:10 -05:00
00e1e899c0 Rebind all SQL queries to acommodate Postgres 2017-11-17 05:09:16 -05:00
f9c234c2f3
Merge pull request #25 from aclindsa/add_mysql_postgres
Testing: Add MySQL and Postgres
2017-11-16 20:36:15 -05:00
a80a46d83f Add "tcp()" to the MySQL DSN in the example config
This appears to be necessary for the MySQL driver we're using
2017-11-16 20:19:25 -05:00
e3e381b183 .travis.yml: Disable postgres until it gets fixed 2017-11-16 20:19:00 -05:00
769a74a941 .travis.yml: Test MySQL and Postgres in addition to SQLite 2017-11-16 19:58:42 -05:00
73cedfd700 testing: Allow DB engine and DSN to be selected with environment variables 2017-11-16 19:42:58 -05:00
c48c50d2c5 API: Move prices under securities
For example, instead of GETting /prices/5 to query a price with ID 5,
you now must GET /securities/2/prices/5 (assuming price 5's SecurityId
is 2)
2017-11-16 19:32:30 -05:00
81610adb72 client: Set contentType header 2017-11-13 20:49:26 -05:00
5a6be5a07b Stop using form elements for API
Just send the JSON as the request body
2017-11-13 20:48:19 -05:00
9624f0c5bc Move to a consistent way of handling IDs in URLs 2017-11-12 21:15:00 -05:00
e99abfe866 handlers: Cleanup Context, route handling code 2017-11-12 20:39:36 -05:00
507868b7a5 Begin move away from using http.ServeMux 2017-11-12 20:17:27 -05:00
9429b748fa Prefix all API endpoints with 'v1/', pluralize collections 2017-11-11 08:05:09 -05:00
79ed5dad9f testing: Test Lua Prices 2017-11-10 20:49:45 -05:00
9b1b682bac prices: Implement initial API and tests 2017-11-10 20:13:49 -05:00
7e728ff29b testing: Add initial testing of Lua balances 2017-11-08 20:46:13 -05:00
bca3e3b408 Lua balances: Fix order of operands pulled in 2017-11-08 20:44:34 -05:00
5daed2f508 testing: Add tests for Lua dates
Also fix a timezone bug discovered while testing
2017-11-07 05:58:58 -05:00
6115a16f89 testing: Use a different date-creation format for one Lua accounts test 2017-11-06 21:22:01 -05:00
985270f190 testing: Test Lua accounts 2017-11-06 21:16:04 -05:00
fb67ab586f testing: Add __eq and __tostring tests for Lua securities 2017-11-06 05:49:58 -05:00
6c18506432 testing: Separate out simple Lua testing 2017-11-06 05:37:52 -05:00
c4ed7d3c50 testing: Test get_securities() Lua call 2017-11-05 21:25:20 -05:00
0dec4001eb testing: Test Lua securities 2017-11-05 20:53:20 -05:00
5dd27a6c56 Lua: Add Security.AlternateId getter 2017-11-05 20:52:36 -05:00
f2a45dc6b6 Make SecurityType its own type 2017-11-05 20:43:32 -05:00
6fb66ac04e testing: Add initial report tabulation test 2017-11-03 22:13:20 -04:00
0863e5fa5c testing: Don't omit the 0th elements when testing 2017-11-03 20:54:17 -04:00
5504d37482 testing: Improve testing CRUD for reports
Ensure we don't get silent errors if the Lua code is longer than the
database column, don't leave out the first report from testing, test
fetching multiple reports.
2017-11-03 20:50:19 -04:00
72cbcca965 testing: Add RUD tests for reports 2017-11-02 21:20:43 -04:00
82362f7ebc testing: Use an in-memory sqlite3 database
This makes testing *much* faster and removes the need for creating
temporary directories
2017-11-01 21:09:55 -04:00
9cca8d1db6 accounts_test.go: Fix typo in failure message 2017-11-01 21:03:20 -04:00
d3c03e4380 testing: Test creating reports 2017-11-01 21:03:07 -04:00
5b0b0bd03b testing: Ensure account versions increased when creating/deleting transactions 2017-11-01 05:59:16 -04:00
e03944c80f testing: Ensure account versions are increased when modifying transactions 2017-11-01 05:44:40 -04:00
4963e473aa testing: Add files and line numbers to logging output 2017-10-31 21:04:03 -04:00
9721c04e52 testing: More thoroughly test fetching account transactions 2017-10-31 20:56:13 -04:00
8ba6a3dbf2 testing: Add initial account transactions test
Update one SQL query to do an 'INNER JOIN' instead of an 'IN' with a
subquery. This avoids error messages like:
  Error 1235: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
2017-10-30 21:14:19 -04:00
5056b2b2ec Fixup build error from typo
This was introduced in 3869f3a3b2
2017-10-30 21:06:27 -04:00
3869f3a3b2 Get all current tests to pass with MySQL
This is done by requiring 'parseTime=true' in the MySQL DSN's (required
by github.com/go-sql-driver/mysql when Scan()ing to time.Time's), and
not forcing update counts to match if rows were updated to what they
already were.
2017-10-24 20:57:55 -04:00
a1d294c309 securities: Allow SQL update count to be 0
MySQL reports 0 here, while sqlite reports 1. Improve the logged message
while we're at it.
2017-10-24 20:24:12 -04:00
bcbb003e40 users: Simplify deletion of prices and splits owned by a user
The previous way was overly complex and didn't work with MySQL anyway
2017-10-24 20:13:42 -04:00
09a5cf9a99 testing: Test fetching all transactions 2017-10-23 21:14:19 -04:00
45b6482b15 testing: Test deleting transactions 2017-10-23 20:49:27 -04:00
9b00bc8db1 testing: Add more data 2017-10-23 20:10:00 -04:00
2246a4bff9 testing: Add more test data 2017-10-23 05:49:26 -04:00