Commit Graph

35 Commits

Author SHA1 Message Date
shockrah
b289f5c811 * Fixing /badge/update/name parameters for basic test
Basically we weren't sending the right data to prompt a 200 response

!!! the /badge/delete test is breaking previous tests idk why
Even though this test comes close to last it still manages to break
the tests that come before it. The problem may lie with the fact that
because its a much faster route by design that its e2e latency btfo's
the routes before it, allowing it to finish before they do.
This likely causes a race condition.
2021-06-07 23:53:49 -07:00
shockrah
d3eddce81f * Fixing typo which broke test behavior 2021-06-07 22:47:44 -07:00
shockrah
fa89088094 + Adding new badges tests
! Test bot is once again a massive disaster but at least it scales well /shrug
Should probably refactor test bot to be moar straight forward or something idk

+ Also adding some spacing eye candy to make sure we can read things easily
2021-06-07 22:33:53 -07:00
shockrah
990ad347f7 * Change join route to just /join 2021-05-26 12:08:55 -07:00
shockrah
cfbee6d887 ! This merge denotes the MVP completion for the backend decentralization endpoints
More routes are to be added in the future but for now this should suffice

Doc's are now required and the roadmap need to be updated as well
2021-05-12 14:27:34 -07:00
shockrah
c25e8047cf + Finishing up more tests for the /neighbors routes
For now this sub api is at an mvp stage so it should be fine to move onto new
features after this point for now.
2021-05-12 14:22:14 -07:00
shockrah
e94c720332 + More comprehensive testing on /neighbor/update
The cases that actually matter should be covered now so I'm confident with this
endpoint's behavior
! A preliminary db::neighbors::get is done to cover the 404 case
Basically if a bad url is used in the request we should 404 the update as there
won't be anything relevant to update
2021-05-12 13:05:52 -07:00
shockrah
8bff61ab71 * Fixed issue where put requests weren't firing with the optional body parameter
This also "fixes" the /neighbor/update route conveniently enough, which had much
better behavior than expected before.

- Remvoing some fluff from debugging
2021-05-12 13:02:42 -07:00
shockrah
664b837f13 + More tests for /neighbor routes
! put /neighbor/update is failing due to a failure to parse the body correctly on thebackend
Further investigation is required

+ Kinda minor but I'm also adding the ability to `put` things now
+ Also an if statement to avoid failing on checkf for NoneType responses
2021-05-11 17:16:50 -07:00
shockrah
45540ddd25 * Better failure logging in failed requests
self.passing property is a much more comprehensive way of checking for passing tests
Also this uses the colors to dump to stdout
2021-05-11 15:22:56 -07:00
shockrah
83f846640c - Removing unused .env files
Opting now for config.json files as they better interoperability between node and rust

+ Hardcoding some variables into build-db.sh
This really shouldn't be an issue however

+ using cat to dump out what table structures are being setup due to strange bugs in pipeline
2021-05-10 15:58:57 -07:00
shockrah
96bdd70cd5 + MOre comprehensive logs from subprocess in create_admin 2021-05-10 13:59:10 -07:00
shockrah
c443b9bb07 + More tests for the /neighbor/add and /neighbor/list routes
These are baseline tests however a new /neighbor/remove & /neighbor/edit route should be edited before I call this done on the roadmap.
Also some more intense testing around these current routes is required.
Mostly because the expectation that JSON is being sent  to us in /neighbor/add
It could be worth the effort to send this data as json in the body
! Currently parameters are sent via the query string is in line with how most routes behave
For this route is just feels weird dealing with al the issues with json in the query string
2021-05-09 23:11:51 -07:00
shockrah
a79195076d * Changin public_url & public_ws_url to shorter url & wsurl respectively
There's also some miscellaneous changes  that don't fit anywhere in this patch (mostly dev qol of roadmap updates)
2021-05-09 23:08:55 -07:00
shockrah
e8348918c4 + More qol like better __str__ methods everywhere
+ More error handling in case shit goes wrong
Basically handling more cases where some initial test could result in the whole
script exiting with code(1)
Not really that big of a deal since most tests after _that_ point will fail anyway
but the fix has revealed issues in the auth code magically so I'm keeping up with the new idea
that initial tests should have every resultant case validated to avoid weird behavior

> good code results in good results
who would have guessed
2021-05-08 02:07:32 -07:00
shockrah
9a22713080 + Testing /invite/join
+ Testing /meta
+ Testing /neighbors/list
2021-05-06 17:12:49 -07:00
shockrah
34115477ab + Mostly adding quality of life changes in this patch with the mock client
These changes will make it easier to read through verbose logs with some tactful
colors (yellow)
2021-05-06 17:03:24 -07:00
shockrah
f094ab49de * Adding some safey into the mock-client tester so that it doesn't just explode in pipelines 2021-05-03 13:24:24 -07:00
shockrah
34426038d9 * Fixing busted invite test in api client tester
+ Adding some more invite status checks
+ Adding a verbose invite usage check for sanity reasons

- Removing run-api-tests script as it now goes into the /scripts/ directory

+ Adding the wss-hmac setup from the command line arg
It was literally just 1 if statement that I forgot to write in
2021-04-27 13:27:39 -07:00
shockrah
61a3f1d4f5 + Adding first pass of a pair of invite endpoint tests 2021-04-26 02:01:04 -07:00
shockrah
e2e68c51ba - Removing old client test code in favor of new structure
+ Moving tests to the new client
- Removing web/ module
! Currently all tests are passing 17/17 but the real trickery comes with doing this
on CI which should will likely take some magic somewhere
Or we'll just extend the freechat docker image to finally have all the required
dependancies and just test on that with diesel and what not
2021-04-21 21:38:25 -07:00
shockrah
38ff0edd39 ! Massive test suite overhaul see details below !
Problem: the old test suite was extremely inflexible
This meant that making new tests took way too much time.

+ This new rework makes the new client's backend much thinner and less "magical"
With less magic going on we can pass way more data more easily to the actual
http-request engine making the convenience wrapper over top it much more flexible

Translating old tests to the new engine might take a while but for now the old
client codebase is completely deprecated and will no longer be used+updated
2021-04-21 17:22:16 -07:00
shockrah
9ce04e96a7 Query string parameter 'type' is now enforced by the api
+ Flag is literally called 'type'
2021-03-12 02:17:06 -08:00
shockrah
ae675d000b content_type now a supported column in db-lib
 API layer now behaves as expected, returning 'content_type' flag with each message
2021-03-09 00:02:20 -08:00
shockrah
7c3537e4f6 Updated target for debugger
 Tests now use the new flags required for /channels/create
 Doubled size for channel descriptions
2021-03-07 17:46:17 -08:00
shockrah
12936d5b1a Removing double log issue with client-tester
 Moving Messages struct in db-lib to root for less namespacing uglyness
 Removing an whole unused trait
 Message::get_time_range now returns a special 'UserMessage' struct that includes the name of the author
 More code must be removed from db-lib since a ton of the trait methods aren't used anymore
2021-03-07 13:29:10 -08:00
shockrah
05acbfa94e Passing tests for invite routes 2021-02-25 16:05:46 -08:00
shockrah
64125a7874 dumy test stats for no reason 2021-02-21 20:10:14 -08:00
shockrah
93fd8c2cd6 +Adding new tests for /members/me/nickname
* Fixed incorrect param key in endpoint handler
+Adding a ycm conf for easier writing
2021-02-21 18:52:35 -08:00
shockrah
34736bef3f updating tests for members routes 2021-02-20 20:14:10 -08:00
shockrah
6bc8dd0d7d tests are now ran with https as we now use https with nginx as a frontend however:
The client tester is super scuffed and no longer in a pipeline ready state as a new docker image has to be created(again)
2021-02-11 20:06:56 -08:00
shockrah
fb36f70d95 Response logs now optionally show the query string when logging, defaulting to always show the logs for now however 2021-02-11 15:04:41 -08:00
shockrah
f585cf122c * switching to building options in query string
* payloads for things like /message/send are now send through the request body
* no longer sending body data in gets

This whole patch is basically so we can allow js clients to exist btw -_-
2021-02-10 23:16:19 -08:00
shockrah
21b184b324 Client tester now uses channel_id where applicable for api parameters
as well as being less explicit about what it passes to the query string
2021-02-10 23:15:05 -08:00
shockrah
b67bb6105f Renaming project to json-api for clarity sake 2021-01-24 13:34:17 -08:00