-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve test suite to be able to test with multiple configuration sets #83
Comments
@JoshuaWalsh Feel free! |
Mostly so I don't forget, here are some bullet points of what I'm planning so far:
What I'm not planning to include in this issue:
Any other ideas/feedback would be appreciated. If you'd rather, we can continue to use Azure Pipelines. I'm attracted to CircleCI due to the free plan they provide for open source projects. |
It's been a while, so I'll provide an update. I think I've made some good progress towards this, I've made a PoC of allowing multiple deployments within the test suite. I've also come up with (what I think is) a clever way to automatically verify the permissions required for each operation. Check out my branch for more details. Unfortunately I've been encountering some very cryptic errors in the AWS SDK, and I'm finding it challenging to debug using Jest. (Most of my breakpoints are ignored, and I'm getting an error from AWS SDK at a point where I'm not making any AWS calls, seems like a concurrency issue but difficult to track down) Additionally I've unexpectedly caught weeb and I'm finding it tricky to find the time and motivation to work on this frustrating task now that I am medically required to watch 5+ hours of anime per day. So in short, I'm still working on this but it's taking longer than expected. If anyone's willing I'd love to get another pair of eyes on this, maybe we can do a VS Live Share session. |
I've been looking through the branch but it's a bit overwhelming at first, maybe you can guide me through it a bit.
This made me laugh for at least a solid 30 secs, so thanks 😛
I'm in! |
@jariz I finally found the willpower to revisit this and I FIGURED OUT THE CRYPTIC ERRORS! There were two issues which combined to make things really confusing:
Anyway, this is now a working proof-of-concept! I'll write some proper documentation later, but for now here's what you need to do to get started:
CircleCI isn't working yet, still working on it. Also the tests I do on the redirects are minimal so far, just proof-of-concept. I intend to bring across all the tests currently in |
Yup, the first deploy intentionally fails. It's intended to check that the IAM policy is correctly configured in order to test permissions. It attempts to deploy to a non-existent bucket without requesting the CreateBucket permission. |
Alright, in that case I said nothing. 😉 |
It does support Windows, and NodeJS is installed by default. https://circleci.com/docs/2.0/hello-world-windows/ I'm still working on the CircleCI stuff, getting it set up right is a little tricky. I'll make sure to use ESLint. |
Awesome! This was so needed. |
I'm sorry this issue has dragged out so long, I know people are waiting for it. Since COVID-19 hit I lost internet connectivity for about 3 weeks, one of the benefits of living in Australia. That did give me a lot of time to think though. After my last comment I realised I wasn't happy with my approach to cleaning up test buckets, as it gave too much room for malicious contributors to abuse AWS resources of the pipeline owner. I hope that this never becomes an issue, but I have made further changes to make such attacks unappealing. Namely, I have added an (optional) Lambda script which will remove all leftover test buckets at a configurable interval. I have also created a Terraform template that sets up the required AWS infrastructure to run the tests. Now I think this feature is as good as I can make it, so here's my to-do list before I can submit a PR:
I know my estimates here have been pretty unreliable (since my last estimate was "within the week" and that was 5 weeks ago) but I'm hoping to complete 1&2 tomorrow evening. |
Currently our automated tests only deploy the site once, which means it's not possible to automatically test different configurations.
We should improve our testing setup to allow for multiple deploy/test iterations with different configurations.
@jariz Do you want to/are you able to do this? Otherwise I'm happy to look into it.
The text was updated successfully, but these errors were encountered: