Skip to content
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

tests: improve and simplify some tests #483

Merged
merged 10 commits into from
Feb 8, 2024
Merged

Conversation

sgotti
Copy link
Member

@sgotti sgotti commented Feb 7, 2024

  • tests: reuse standard run configs
  • tests: improve run configs indentation
  • runservice/tests: remove redundant type declaration
  • tests: remove "test " prefix from test names
  • tests: use commas instead of "and" in test names
  • tests: use "limit ... than results length"
  • tests: remove not needed time.Sleep
  • tests: ensure limit is greater than number of results
  • tests: improve TestGetProject*Delivieries
  • tests: use assert helpers

Define a common EnvRunConfig and a FailingRunConfig that will be reused
between tests. The first one will print the environment and successfully
finish, the second one will fail.
@sgotti sgotti force-pushed the simplify_tests branch 2 times, most recently from 7c05680 to fbc597f Compare February 7, 2024 18:42
It's obvious that a test does a test.
Improve TestGetProjectCommitStatusDeliveries and
TestGetProjectRunWebhookDeliveries by:

* check for errors when providing both a cursor and a filter
* Use multiple calls with cursor when using a filter
Some old PRs weren't rebased to use assert helpers
@sgotti sgotti changed the title tests: simplify some tests tests: improve and simplify some tests Feb 8, 2024
@sgotti sgotti merged commit ce82b8f into agola-io:master Feb 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant