mock_t.go | |
---|---|
Copyright 2020 Red Hat, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
|
Documentation in literate-programming-style is available at: https://redhatinsights.github.io/insights-operator-utils/packages/tests/helpers/mock_t.html |
|
MockT wraps testing.T to be able to test functions accepting testing.TB.
Don't forget to call Finish at the end of the test |
|
NewMockT constructs a new instance of MockT |
|
Finish cleans up after the MockT |
|
ExpectFailOnError adds expects corresponding to those called by helpers.FailOnError function |
|
ExpectFailOnErrorAnyArgument adds expects corresponding to those called by helpers.FailOnError function with any argument |
|
Cleanup mocks Cleanup method of testing.T |
|
Error mocks Error method of testing.T |
|
Errorf mocks Errorf method of testing.T |
|
Fail mocks Fail method of testing.T |
|
FailNow mocks Fail method of testing.T |
|
Failed mocks Failed method of testing.T |
|
Fatal mocks Fatal method of testing.T |
|
Fatalf mocks Fatalf method of testing.T |
|
Log mocks Log method of testing.T |
|
Logf mocks Logf method of testing.T |
|
Skip mocks Skip method of testing.T |
|
SkipNow mocks SkipNow method of testing.T |
|
Skipf mocks Skipf method of testing.T |
|
Skipped mocks Skipped method of testing.T |
|