coder / backstage-plugins

Official Coder plugins for the Backstage platform
34 stars 2 forks source link

chore: add all missing tests for backstage-plugin-coder #101

Closed Parkreiner closed 5 months ago

Parkreiner commented 5 months ago

Closes #8

Changes made

Notes

There is one more behavior that could use a test, but I'm not sure if it's worth it. Basic steps are:

  1. Log into the Coder deployment with user account 1
  2. Log into Backstage
  3. Get the auth token for user account 1, and insert it
  4. Go back to the Coder deployment, log out, and then log in with user account 2
  5. Expect that the workspaces for user account 1 no longer appear

I was running into this when I was logged into the Full-stack challenge account, but had a token loaded for my personal Coder account. I think there is a way to simulate this at least, but:

  1. I don't know if it's 100% reliable and would give us that much confidence
  2. I don't know if this edge case is too niche to warrant complicating some of the testing setup