-
Notifications
You must be signed in to change notification settings - Fork 59
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
Adding Backplane Console tests #359
Adding Backplane Console tests #359
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #359 +/- ##
==========================================
+ Coverage 44.53% 48.27% +3.74%
==========================================
Files 54 55 +1
Lines 4145 4182 +37
==========================================
+ Hits 1846 2019 +173
+ Misses 2034 1844 -190
- Partials 265 319 +54
|
0572b21
to
b47c395
Compare
Added tests for validatecontainer engine, getcontainerengineimpl and the run function. Added isTest flag to console options to prevent the occurance of an infinite loop Added tests for cleanup function for console options Added an additional test for ports "Remove test for cleanup function" Uncapitalize strings Expect error from run command to be lower case Split up the Validate Container Engine Tests Added podman and docker into a temp path Added exec permissions to temp file Change order of errors Implemented isTest flag in consoleOptions, this is a workaround since that environment varibles within contains cannot be changed, this purely Incorperated validateContainerEngine into consoleOptions, this is due to some problems with containers and testing Make changes in test for validateContainerEngine Added missing method Make lint changes to o.test flag Roll back changes to validateContainerEngine Added a functionality to mock the existence of a podman and docker binary, but they are actually just empty executable files in tmpfs Made changes to the circuit breaker at run Cleaned up some formatting issues Added tests for ocm-backplane and made some formatting and syntax changes Alternative workaround for console test of the run function in console.go via mock interfaces Moved temp path configuration utilities in console_test to console_test_utils added file console_tests_util.go Added defensive code into cleanup and moved mockinterface into utils Commenting Removed uncessary comments
b47c395
to
ae3c62b
Compare
@rhs-harliu: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhs-harliu, samanthajayasinghe 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 |
What type of PR is this?
unit-test
What this PR does / Why we need it?
This adds a series of unit tests for the console.go file
Which Jira/Github issue(s) does this PR fix?
OSD-20030
Resolves #
There has been a long standing issue with unit testing the console.go file, this commit adds a series of tests and some minor changes to console.go to ensure the use of mock interfaces for testing.
Special notes for your reviewer
Pre-checks (if applicable)