Skip to content

test addition for sync page - #502

Open
Bala-Sakabattula wants to merge 2 commits into
release-engineering:mainfrom
Bala-Sakabattula:sync-page-test
Open

test addition for sync page #502
Bala-Sakabattula wants to merge 2 commits into
release-engineering:mainfrom
Bala-Sakabattula:sync-page-test

Conversation

@Bala-Sakabattula

Copy link
Copy Markdown
Collaborator

Adding test case for sync page and also as per the feedback #501 (comment) calling the clean up job at requests..

@webbnh webbnh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There's no single item here that I would block the merge over, but there are a number of small things (which seem to be centered around the name of the module 😛) which I think you should consider before merging, and I've got a bunch of other tweaks and suggestions, as well.

Comment thread sync-page/event-handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated
Comment thread tests/test_event_handler.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As long as you're at it, do you want to have tests for the "/" and "/github" routes? The tests are trivial, but they improve the coverage and help prevent "rot". 😇

@webbnh webbnh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks excellent, Bala. There is just one item (other than my previous comment about trivial tests 😉) which I'd like you to consider.

But, if you're satisfied with both as they are, let me know and I'll close the conversations.

_MODULE_PATH = str(
pathlib.Path(__file__).parent.parent / "sync-page" / "event-handler.py"
)
sys.path.insert(0, str(pathlib.Path(__file__).parent.parent / "sync-page"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is an unsatisfying hack. Do you understand why it is necessary?

Could we get the same effect by omitting this from here and changing the Tox or unittest configuration? (None of the sync2jira tests have this...so why does the sync-page test need it?)

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