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

[ENG-5546] Catch all github-related errros in addons test CI suite #10606

Conversation

ly-mariia
Copy link
Contributor

Purpose

Address 9 failed tests due to lack of mock data and missing session.

Changes

  • fix test_link_repo_registration test;
  • fix settings conflict;
  • fix test_link_repo_registration test;
  • fix test_get_refs_registered_missing_branch test;
  • fix test_before_page_load_osf_public_gh_public test;
  • fix tests from classes TestCallbacks and TestNodeSettings;

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

https://openscience.atlassian.net/browse/ENG-5546

Copy link
Member

@felliott felliott left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor style fixes needed.

@@ -518,24 +519,94 @@ def test_link_repo_non_existent(self, mock_repo):

assert res.status_code == 400

user = 'octo-cat'
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: if this is constant fixture data, can you capitalize the variable names and move it either to the top of the class definition or the file definition (whichever is more appropriate)?

'tree': {'url': 'https://docs.github.com/en/rest/git/trees',
'sha': 'e22d92d5d90bb8f9695e9a5e2e2311a5c1997230'},
}
repo_parents = [
Copy link
Member

Choose a reason for hiding this comment

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

ditto the above vars

'tree': {'url': 'https://docs.github.com/en/rest/git/trees',
'sha': 'e22d92d5d90bb8f9695e9a5e2e2311a5c1997230'},
}
repo_parents = [
Copy link
Member

Choose a reason for hiding this comment

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

same comment as below (sorry they are out of order)

@felliott felliott merged commit f0c3ef6 into CenterForOpenScience:feature/python-upgrade May 6, 2024
1 of 6 checks passed
@felliott
Copy link
Member

felliott commented May 6, 2024

Nice! Merged.

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.

2 participants