Simplify test setup by removing option for global overrides (#7302)

* Remove option to doGeneralOverrides and do it always

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Override telemetry by default to optimize and simplify testing

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Simplify more usages of getDiForUnitTesting

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix code style

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala authored and GitHub committed 2023-03-07 12:23:57 -05:00
1 parent 8fa92c06ea
commit 0d480917cf
95 files changed
+165 -161

No files matched your search

@@ -16,7 +16,7 @@ describe("Helm Service tests", () => {
let getActiveHelmRepositoriesMock: jest.Mock<Promise<AsyncResult<HelmRepo[]>>>;
beforeEach(() => {
const di = getDiForUnitTesting({ doGeneralOverrides: true });
const di = getDiForUnitTesting();
getActiveHelmRepositoriesMock = jest.fn();
@@ -21,7 +21,7 @@ describe("exec-file-with-input", () => {
};
beforeEach(() => {
const di = getDiForUnitTesting({ doGeneralOverrides: true });
const di = getDiForUnitTesting();
di.unoverride(execFileWithInputInjectable);
@@ -21,7 +21,7 @@ describe("get helm release resources", () => {
let execFileWithStreamInputMock: AsyncFnMock<ExecFileWithInput>;
beforeEach(() => {
const di = getDiForUnitTesting({ doGeneralOverrides: true });
const di = getDiForUnitTesting();
execHelmMock = asyncFn();
execFileWithStreamInputMock = asyncFn();