Skip to content

Commit

Permalink
[Code] try fix this test (#43692) (#44586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yulong authored Sep 2, 2019
1 parent b68b369 commit ed32127
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit ed32127

Please sign in to comment.