chores: better tests for urban dictionary and mojang wrappers and nukes dead mojang apis #80

Merged
SethFalco merged 3 commits from improve-qa into main 2025-04-03 22:29:25 +01:00
SethFalco commented 2025-04-03 22:27:27 +01:00 (Migrated from gitlab.com)

When I originally wrote Elypiai (5+ years ago), I was too fixated on #CleanCode that I didn't stop to think if certain practices I'd learned actually made sense in the context of the project.

One such daft decision I made was manually committing and testing against snapshots of the API instead of the live API. In this project, it literally makes no sense to test against snapshots, we want to find out as soon as possible if there are problems with a service wrapper, and the best way to do that is through a real API call.

We'll move towards writing tests that have looser assertions, will verify that:

  • the endpoint still exists
  • that we're able to deseralize the response from the API
  • that any required fields are not null

I've also updated the Contributing Guide to contain more helpful information, and clarify our methodology for testing.

Mojang APIs

Worth noting that we wrapped various Mojang APIs across multiple domains. The Authentication server has been taken down though as Minecraft now only supports Microsoft authentication. The server for the server status had been unreliable since I first wrapped it, and has since been taken down too.

As these are no longer relevant, I've just deleted code for dead endpoints, outdated parameters, or removed servers, etc.

When I originally wrote Elypiai (5+ years ago), I was too fixated on #CleanCode that I didn't stop to think if certain practices I'd learned actually made sense in the context of the project. One such daft decision I made was manually committing and testing against snapshots of the API instead of the live API. In this project, it literally makes no sense to test against snapshots, we want to find out as soon as possible if there are problems with a service wrapper, and the best way to do that is through a real API call. We'll move towards writing tests that have looser assertions, will verify that: * the endpoint still exists * that we're able to deseralize the response from the API * that any required fields are not null I've also updated the Contributing Guide to contain more helpful information, and clarify our methodology for testing. ## Mojang APIs Worth noting that we wrapped various Mojang APIs across multiple domains. The Authentication server has been taken down though as Minecraft now only supports Microsoft authentication. The server for the server status had been unreliable since I first wrapped it, and has since been taken down too. As these are no longer relevant, I've just deleted code for dead endpoints, outdated parameters, or removed servers, etc.
SethFalco commented 2025-04-03 22:29:18 +01:00 (Migrated from gitlab.com)

changed title from chores: better tests for urban dictionary and mojang wrappers to chores: better tests for urban dictionary and mojang wrappers{+ and nukes dead mojang apis+}

changed title from **chores: better tests for urban dictionary and mojang wrappers** to **chores: better tests for urban dictionary and mojang wrappers{+ and nukes dead mojang apis+}**
SethFalco commented 2025-04-03 22:29:18 +01:00 (Migrated from gitlab.com)

changed the description

changed the description
SethFalco commented 2025-04-03 22:29:25 +01:00 (Migrated from gitlab.com)

mentioned in commit 8f1037cb3d

mentioned in commit 8f1037cb3d7aa4a08633108af1ae9bceafe3629d
SethFalco (Migrated from gitlab.com) merged commit 8f1037cb3d into main 2025-04-03 22:29:25 +01:00
SethFalco commented 2025-04-03 22:29:46 +01:00 (Migrated from gitlab.com)

changed the description

changed the description
Sign in to join this conversation.
No description provided.