From 01e2e649117c71f1bc2ed2c075983dae09c3e0cf Mon Sep 17 00:00:00 2001 From: Yulong Date: Mon, 2 Sep 2019 14:54:10 +0800 Subject: [PATCH] [Code] try fix this test (#43692) --- .../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 6fc31d889cc994..6a814982c22ff6 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(