changed getArcKubeconfig from promise to async function

This commit is contained in:
Atharva Mulmuley
2021-06-03 13:58:17 +05:30
parent b903fa8c1a
commit f6361247fd
3 changed files with 10 additions and 7 deletions

View File

@ -223,8 +223,8 @@ describe('Testing all functions.', () => {
jest.spyOn(arc,'sleep').mockImplementation();
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {});
jest.spyOn(core, 'exportVariable').mockImplementation(() => {});
await arc.getArcKubeconfig();
//expect(core.getInput).toBeCalledTimes(4);
expect(await arc.getArcKubeconfig());
expect(core.getInput).toBeCalledTimes(4);
expect(io.which).toHaveBeenCalledWith("az",true);
expect(arc.executeAzCliCommand).toHaveBeenNthCalledWith(1,`account show`, false);
expect(arc.executeAzCliCommand).toHaveBeenNthCalledWith(2,`extension remove -n connectedk8s`, false);