-
Notifications
You must be signed in to change notification settings - Fork 10
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
spec: integration tests #69
base: master
Are you sure you want to change the base?
Conversation
5226a90
to
0dc882c
Compare
Codecov Report
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 98.42% 98.24% -0.19%
==========================================
Files 119 96 -23
Lines 4266 2627 -1639
==========================================
- Hits 4199 2581 -1618
+ Misses 67 46 -21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
a351053
to
7523ab0
Compare
7523ab0
to
7e114c1
Compare
@tonobo @Kjarrigan Works now, you can have a look at it when you have time. I'll leave the PR as "Draft", because before we merge I want to switch back There are some not so nice segments in the code, maybe you know something better? I want to allow multiple test runs in parallel, thus I am generating a unique ID. Had to use a global variable to persist it across examples :/ def resource_name(name)
# use a random ID to allow multiple CI runs in parallel
$random_resource_name_id ||= Random.rand(10_000..99_999)
"hcloud-ruby-integration-#{$random_resource_name_id}-#{name}"
end And some resources (floating IPs, images) do not allow easy access by name. Normally, I can delete the resources at the end of the test run by using the names, but floating IPs and images only have descriptions, so I need to delete them by ID. I am thus saving the IDs of generated resources to a instance variable |
@tonobo Can you delete or unprotect my branch |
We have already moved the legacy tests to a folder called integration, because we want to use them for real integration tests against the Hetzner API. This PR applies the necessary changes to the existing tests so that they run successfully in a non-empty cloud project.
Closes #61