From 813135be68269b473d72a77ab8cf3adb3947866c Mon Sep 17 00:00:00 2001 From: Yulong Date: Mon, 2 Sep 2019 16:44:30 +0800 Subject: [PATCH] [Code] try fix this test (#43692) (#44585) --- .../plugins/code/server/lsp/workspace_handler.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/code/server/lsp/workspace_handler.test.ts b/x-pack/legacy/plugins/code/server/lsp/workspace_handler.test.ts index 6fc31d889cc99..6a814982c22ff 100644 --- a/x-pack/legacy/plugins/code/server/lsp/workspace_handler.test.ts +++ b/x-pack/legacy/plugins/code/server/lsp/workspace_handler.test.ts @@ -103,8 +103,8 @@ test('should support spaces in workspace dir', async () => { }); // FLAKY: https://github.com/elastic/kibana/issues/43655 -test.skip('should support case-insensitive workspace dir', async () => { - const workspaceCaseInsensitive = path.join(baseDir, 'WorkSpace'); +test('should support case-insensitive workspace dir', async () => { + const workspaceCaseInsensitive = path.join(baseDir, 'CamelCaseWorkSpace'); // test only if it's case-insensitive const workspaceHandler = new WorkspaceHandler( gitOps, @@ -114,7 +114,9 @@ test.skip('should support case-insensitive workspace dir', async () => { new ConsoleLoggerFactory() ); const { repo, revision, file, uri } = makeAFile(workspaceCaseInsensitive); - if (fs.existsSync(workspaceCaseInsensitive.toLocaleLowerCase())) { + // normally this test won't run on linux since its filesystem are case sensitive + // So there is no 'CAMELCASEWORKSPACE' folder. + if (fs.existsSync(workspaceCaseInsensitive.toUpperCase())) { const converted = handleResponseUri(workspaceHandler, uri.toLocaleLowerCase()); // workspace dir should be stripped expect(converted).toBe(