1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Modified kubeconfig manager test to avoid intermittent ENXIO error (#2516)

* modified kubeconfig manager test to avoid intermittent ENXIO error

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* fix lint

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-04-12 23:57:56 -04:00 committed by GitHub
parent 2bba0d578b
commit bbfad2f35f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,9 @@ describe("kubeconfig manager tests", () => {
expect(logger.error).not.toBeCalled();
expect(await kubeConfManager.getPath()).toBe(`tmp${path.sep}kubeconfig-foo`);
const file = await fse.readFile(await kubeConfManager.getPath());
// this causes an intermittent "ENXIO: no such device or address, read" error
// const file = await fse.readFile(await kubeConfManager.getPath());
const file = fse.readFileSync(await kubeConfManager.getPath());
const yml = loadYaml<any>(file.toString());
expect(yml["current-context"]).toBe("minikube");