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

NH-67051 Add report_init_event tests #240

Merged
merged 9 commits into from
Nov 30, 2023

Conversation

tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi commented Nov 24, 2023

Adds report_init_event tests!! Tricky mocks for this one.

Tests pass with c-lib 14 (5d7dcee) before revert

@tammy-baylis-swi tammy-baylis-swi marked this pull request as ready for review November 25, 2023 00:57
@tammy-baylis-swi tammy-baylis-swi requested a review from a team as a code owner November 25, 2023 00:57

@pytest.fixture(name="mock_extension_status_code_invalid_protocol")
def mock_extension_status_code_invalid_protocol(mocker):
return get_extension_mocks(mocker, 2)
Copy link
Contributor

@cheempz cheempz Nov 27, 2023

Choose a reason for hiding this comment

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

Great addition of these different scenarios "ok", "already_init" and "invalid_protocol"! It's pointing out something a little subtle--we're checking the reporter initialization status as part of reporting the Init event, and actually ignoring the return code from the report Init event sendStatus call.

Copy link
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

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

LGTM, great to see these tests which will help with regression as we consider upcoming changes @tammy-baylis-swi! One future possibility is to have an explicit check of the "extension" (whether full oboe with reporter, or minimal Lambda api) init/loading status rather than as part of sending Init event.

@tammy-baylis-swi
Copy link
Contributor Author

One future possibility is to have an explicit check of the "extension" (whether full oboe with reporter, or minimal Lambda api) init/loading status rather than as part of sending Init event.

Thank you @cheempz ! New ticket here: https://swicloud.atlassian.net/browse/NH-68251

@tammy-baylis-swi tammy-baylis-swi merged commit 40e18b5 into main Nov 30, 2023
3 of 11 checks passed
@tammy-baylis-swi tammy-baylis-swi deleted the NH-67051-add-report-init-event-tests branch November 30, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants