Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

tests: Clean up lost test guilds #676

Merged
merged 3 commits into from
Oct 18, 2022
Merged

tests: Clean up lost test guilds #676

merged 3 commits into from
Oct 18, 2022

Conversation

silasary
Copy link
Collaborator

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

I noticed that #675 was failing because we hit the ten guild limit.
This should only have happened if we were either:

  • Running more than 10 simultaneous test jobs at the same time.
  • Or tests have at some point in the past failed so catestrophically that they didn't delete their guild at the end of the run.

This PR adds a (rather naive) check for an existing test guild that's more than a day old, and if so, deletes it.
Definitely could be optimized or improved, but eh, this is good enough for our purposes.

Changes

  • Adds the ability to to load tokens from a .env file (mostly for my own convenience)
  • Adds a naive cleanup procedure to the top of the guild fixture.

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@LordOfPolls LordOfPolls merged commit 80bd83e into dev Oct 18, 2022
@silasary silasary deleted the tests branch October 27, 2022 04:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants