From b5b099ca1a4d2740c8e2d39ee1897b7a652ad05f Mon Sep 17 00:00:00 2001 From: spacedragon Date: Thu, 22 Aug 2019 00:06:36 +0800 Subject: [PATCH] [Code] try fix this test --- .../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(