+
Skip to content

ADX-924 ADX-919 regression tests #18

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

Merged
merged 5 commits into from
Dec 13, 2022

Conversation

ChasNelson1990
Copy link
Member

@ChasNelson1990 ChasNelson1990 commented Dec 12, 2022

So I have refactored #16 slightly and also added a test suite for this bug:

  • creating new resource that is not a fork, i.e. ensure we don't break original behaviour: TestResourceCreate.test_not_fork_resource_create()
  • creating new resource that is fork: already done by pre-existing tests
  • changing fork resource to non-forked resource, i.e. ensure we don't break the ability to override a fork resource with non-fork data: TestResourceUpdate.test_fork_resource_update_with_new_non_fork_resource_details()
  • changing non-fork resource to fork: TestResourceUpdate.test_non_fork_resource_update_with_new_fork_details()
  • syncing fork resource after parent change: this is essentially tested by TestResourceUpdate:test_fork_resource_update_with_activity_id()
  • changing fields like description and permissions on forked resources: TestResourceUpdate: test_fork_resource_update_with_new_metadata()
  • uploading new file to a fork resource, overriding the forkiness but using the API instead of UI, i.e. the main bug we were trying to fix: TestResourceUpdate.test_non_fork_resource_update_with_new_fork_details_via_api_call()

Also:

  • renamed the test classes as the really calls to resource_update etc., which under the hood calls package_update etc. - this could be a preference thing but it just felt weird to have classes that said they were testing package actions but that never called package actions directly
  • fixed a typo on (what is now) line 308
  • added fork to four pre-existing test names for consistency with new tests

@ChasNelson1990 ChasNelson1990 added the enhancement New feature or request label Dec 12, 2022
@ChasNelson1990 ChasNelson1990 self-assigned this Dec 12, 2022
Copy link
Member

@jonathansberry jonathansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good step forward. Just flagged a few issues for attention. Thanks so much for moving on this quickly.

ChasNelson1990 and others added 2 commits December 12, 2022 16:30
Co-authored-by: Jonathan Berry <jonathan.s.berry@gmail.com>
Co-authored-by: Jonathan Berry <jonathan.s.berry@gmail.com>
Copy link
Member

@jonathansberry jonathansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right back at you!

Co-authored-by: Jonathan Berry <jonathan.s.berry@gmail.com>
@ChasNelson1990
Copy link
Member Author

There's no point in having them in separate try/except blocks, if you handle them in exactly the same way right?

Agreed!

@ChasNelson1990 ChasNelson1990 merged commit 2b7b0bf into development Dec 13, 2022
@ChasNelson1990 ChasNelson1990 deleted the ADX-919-regression-tests branch December 13, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载