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

GITOPSRVCE-704: Improve test coverage of 'application_event_runner.go' in backend component #657

Merged

Conversation

jgwest
Copy link
Member

@jgwest jgwest commented Sep 26, 2023

Description:

  • Vast majority of new work in this PR is in 'Generic Application Event Loop Runner tests' in application_event_runner_test.go
  • The rest of the PR is just some misc refactoring:
    • In a couple cases, I changed chan *eventlooptypes.EventLoopEvent to chan eventlooptypes.EventLoopEvent, as it didn't make sense for these to be pointers.
    • Added context and factory parameters to ApplicationEventLoopRunner interface

Link to JIRA Story (if applicable): GITOPSRVCE-704

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgwest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jgwest jgwest changed the title 704 application event runner sept 2023 GITOPSRVCE-704 - Improve test coverage of 'application_event_runner.go' in backend component Sep 26, 2023
@jgwest jgwest changed the title GITOPSRVCE-704 - Improve test coverage of 'application_event_runner.go' in backend component GITOPSRVCE-704: Improve test coverage of 'application_event_runner.go' in backend component Sep 26, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 26, 2023

@jgwest: This pull request references GITOPSRVCE-704 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Description:

  • Vast majority of new work in this PR is in 'Generic Application Event Loop Runner tests' in application_event_runner_test.go
  • The rest of the PR is just some misc refactoring:
    • I moved some tests out of application_event_runner_test.go, and into the proper test file (sync run tests into _syncrun_tests.go, and deployment tests into _deployment_tests.go). The contents of those test themselves is otherwise unchanged.
      • The tests that I moved were actually testing functionality in application_event_runner_deployments.go and application_event_runner_syncruns.go, so it made sense to move those tests to the corresponding _test files.
    • In a couple cases, I changed chan *eventlooptypes.EventLoopEvent to chan eventlooptypes.EventLoopEvent, as it didn't make sense for these to be pointers.
    • Added context and factory parameters to ApplicationEventLoopRunner interface

Link to JIRA Story (if applicable): GITOPSRVCE-704

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (f80aaa6) 61.04% compared to head (d578c2d) 62.61%.
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #657      +/-   ##
==========================================
+ Coverage   61.04%   62.61%   +1.56%     
==========================================
  Files          99       99              
  Lines       18032    18113      +81     
==========================================
+ Hits        11008    11341     +333     
+ Misses       5784     5509     -275     
- Partials     1240     1263      +23     
Files Coverage Δ
...red_resource_loop/sharedresourceloop_managedenv.go 72.79% <100.00%> (+0.61%) ⬆️
...event_loop/application_event_runner_deployments.go 67.76% <50.00%> (+0.77%) ⬆️
...application_event_loop/application_event_runner.go 73.54% <82.35%> (+46.58%) ⬆️
...entloop/shared_resource_loop/sharedresourceloop.go 72.47% <0.00%> (ø)
...p/application_event_loop/application_event_loop.go 73.55% <28.57%> (-3.06%) ⬇️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgwest jgwest removed the request for review from jparsai October 4, 2023 16:55
@jgwest jgwest force-pushed the 704-application-event-runner-sept-2023 branch from a4c1a5d to 7d08524 Compare October 12, 2023 00:54
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 12, 2023

@jgwest: This pull request references GITOPSRVCE-704 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Description:

  • Vast majority of new work in this PR is in 'Generic Application Event Loop Runner tests' in application_event_runner_test.go
  • The rest of the PR is just some misc refactoring:
    • In a couple cases, I changed chan *eventlooptypes.EventLoopEvent to chan eventlooptypes.EventLoopEvent, as it didn't make sense for these to be pointers.
    • Added context and factory parameters to ApplicationEventLoopRunner interface

Link to JIRA Story (if applicable): GITOPSRVCE-704

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jgwest
Copy link
Member Author

jgwest commented Oct 12, 2023

/retest
There's already a JIRA issue open for the intermittent failure

@jgwest
Copy link
Member Author

jgwest commented Oct 12, 2023

/retest

@Rizwana777
Copy link
Contributor

@jgwest Looks good to me, added comments for few typos

@jgwest
Copy link
Member Author

jgwest commented Oct 17, 2023

Thanks @Rizwana777!

@jgwest jgwest merged commit 73de118 into redhat-appstudio:main Oct 17, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants