E2E: Add waiter in bulk_import_group validation spec
Description of the test
This started as attempt to debug/fix #331704 (closed). Turned out that waiting logic doesn't actually fix the problem but I think this kind of matcher can still be useful in the future so leaving it.
- Adds waiter for import validation which since some of the recent changes uncovered flakiness, incorrect behaviour
- Introduces a more convenient way to do so via
eventually_
rspec matcher. In case such matcher fails, the produced error message would look something like this:
Failure/Error: expect { imported_group.labels }.to eventually_include(*source_group.labels).within(duration: 5)
Wait condition not met after 5 seconds:
expected to eventually include {
"name": "source-group-fc1b15d6",
"description": "This is a test label",
"description_html": "This is a test label",
"color": "#0033CC",
"text_color": "#FFFFFF",
"subscribed": false
}, last attempt was []
Check-list
-
Follow the end-to-end tests style guide and best practices. -
Use the appropriate RSpec metadata tag(s). -
Ensure that a created resource is removed after test execution. A Group
resource can be shared between multiple tests. Do not remove it unless it has a unique path. Note that we have a cleanup job that periodically removes groups undergitlab-qa-sandbox-group
. -
Ensure that no transient bugs are hidden accidentally due to the usage of waits
andreloads
. -
Verify the tags to ensure it runs on the desired test environments.
Edited by Andrejs Cunskis