Skip to content

Commit

Permalink
Resolve build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoningLiu committed Sep 24, 2020
1 parent e508e21 commit 24f3325
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 60 deletions.
5 changes: 2 additions & 3 deletions sdk/storage/storage-file-datalake/src/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import {
toAclString,
toPathGetAccessControlResponse,
toPermissionsString,
toProperties,
toProperties
} from "./transforms";
import { Batch } from "./utils/Batch";

Expand All @@ -81,14 +81,13 @@ import {
FILE_MAX_SINGLE_UPLOAD_THRESHOLD,
FILE_MAX_SIZE_BYTES,
FILE_UPLOAD_DEFAULT_CHUNK_SIZE,
FILE_UPLOAD_MAX_CHUNK_SIZE,
FILE_UPLOAD_MAX_CHUNK_SIZE
} from "./utils/constants";
import { createSpan } from "./utils/tracing";
import { appendToURLPath, setURLPath } from "./utils/utils.common";
import { fsStat, fsCreateReadStream } from "./utils/utils.node";
import { BufferScheduler } from "../../storage-common/src";


/**
* A DataLakePathClient represents a URL to the Azure Storage path (directory or file).
*
Expand Down
114 changes: 57 additions & 57 deletions sdk/storage/storage-file-datalake/test/node/pathclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DataLakeFileSystemClient,
DataLakeServiceClient,
PathAccessControlItem,
PathPermissions,
PathPermissions
} from "../../src";
import { toAcl, toRemoveAcl } from "../../src/transforms";
import { bodyToString, getDataLakeServiceClient, recorderEnvSetup } from "../utils";
Expand All @@ -27,7 +27,7 @@ describe("DataLakePathClient Node.js only", () => {

let recorder: any;

beforeEach(async function () {
beforeEach(async function() {
recorder = record(this, recorderEnvSetup);
serviceClient = getDataLakeServiceClient();
fileSystemName = recorder.getUniqueName("filesystem");
Expand All @@ -40,7 +40,7 @@ describe("DataLakePathClient Node.js only", () => {
await fileClient.flush(content.length);
});

afterEach(async function () {
afterEach(async function() {
await fileSystemClient.delete();
await recorder.stop();
});
Expand All @@ -54,8 +54,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: true,
execute: true,
},
execute: true
}
},
{
accessControlType: "group",
Expand All @@ -64,8 +64,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: false,
execute: true,
},
execute: true
}
},
{
accessControlType: "other",
Expand All @@ -74,9 +74,9 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: false,
write: true,
execute: false,
},
},
execute: false
}
}
];
await fileClient.setAccessControl(acl);

Expand All @@ -90,18 +90,18 @@ describe("DataLakePathClient Node.js only", () => {
owner: {
read: true,
write: true,
execute: true,
execute: true
},
group: {
read: true,
write: false,
execute: true,
execute: true
},
other: {
read: false,
write: true,
execute: false,
},
execute: false
}
});
assert.deepStrictEqual(permissions.acl, acl);
});
Expand All @@ -115,8 +115,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: true,
execute: true,
},
execute: true
}
},
{
accessControlType: "group",
Expand All @@ -125,8 +125,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: false,
execute: true,
},
execute: true
}
},
{
accessControlType: "other",
Expand All @@ -135,13 +135,13 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: false,
write: true,
execute: false,
},
},
execute: false
}
}
];
await fileClient.setAccessControl(acl, {
owner: "$superuser",
group: "$superuser",
group: "$superuser"
});

const permissions = await fileClient.getAccessControl();
Expand All @@ -154,18 +154,18 @@ describe("DataLakePathClient Node.js only", () => {
owner: {
read: true,
write: true,
execute: true,
execute: true
},
group: {
read: true,
write: false,
execute: true,
execute: true
},
other: {
read: false,
write: true,
execute: false,
},
execute: false
}
});
assert.deepStrictEqual(permissions.acl, acl);
});
Expand All @@ -179,8 +179,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: true,
execute: false,
},
execute: false
}
},
{
accessControlType: "group",
Expand All @@ -189,8 +189,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: false,
execute: true,
},
execute: true
}
},
{
accessControlType: "other",
Expand All @@ -199,9 +199,9 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: false,
write: true,
execute: true,
},
},
execute: true
}
}
];

const permissions: PathPermissions = {
Expand All @@ -210,18 +210,18 @@ describe("DataLakePathClient Node.js only", () => {
owner: {
read: true,
write: true,
execute: false,
execute: false
},
group: {
read: true,
write: false,
execute: true,
execute: true
},
other: {
read: false,
write: true,
execute: false,
},
execute: false
}
};

await fileClient.setPermissions(permissions);
Expand All @@ -232,7 +232,7 @@ describe("DataLakePathClient Node.js only", () => {
assert.deepStrictEqual(response.group, "$superuser");
assert.deepStrictEqual(response.permissions, {
...permissions,
other: { ...permissions.other, execute: true },
other: { ...permissions.other, execute: true }
});
assert.deepStrictEqual(response.acl, acl);
});
Expand All @@ -246,8 +246,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: true,
execute: false,
},
execute: false
}
},
{
accessControlType: "group",
Expand All @@ -256,8 +256,8 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: true,
write: false,
execute: true,
},
execute: true
}
},
{
accessControlType: "other",
Expand All @@ -266,9 +266,9 @@ describe("DataLakePathClient Node.js only", () => {
permissions: {
read: false,
write: true,
execute: true,
},
},
execute: true
}
}
];

const permissions: PathPermissions = {
Expand All @@ -277,18 +277,18 @@ describe("DataLakePathClient Node.js only", () => {
owner: {
read: true,
write: true,
execute: false,
execute: false
},
group: {
read: true,
write: false,
execute: true,
execute: true
},
other: {
read: false,
write: true,
execute: false,
},
execute: false
}
};

await fileClient.setPermissions(permissions, { owner: "$superuser", group: "$superuser" });
Expand All @@ -299,7 +299,7 @@ describe("DataLakePathClient Node.js only", () => {
assert.deepStrictEqual(response.group, "$superuser");
assert.deepStrictEqual(response.permissions, {
...permissions,
other: { ...permissions.other, execute: true },
other: { ...permissions.other, execute: true }
});
assert.deepStrictEqual(response.acl, acl);
});
Expand Down Expand Up @@ -346,7 +346,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {

let recorder: any;

beforeEach(async function () {
beforeEach(async function() {
recorder = record(this, recorderEnvSetup);
serviceClient = getDataLakeServiceClient();
fileSystemName = recorder.getUniqueName("filesystem");
Expand All @@ -359,7 +359,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
await fileClient.flush(content.length);
});

afterEach(async function () {
afterEach(async function() {
await fileSystemClient.delete();
recorder.stop();
});
Expand Down Expand Up @@ -438,7 +438,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
maxBatches: 1,
onProgress: () => {
batchCounter++;
},
}
}
);

Expand Down Expand Up @@ -476,7 +476,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
const cumulativeCounters: AccessControlChangeCounters = {
changedDirectoriesCount: 0,
changedFilesCount: 0,
failedChangesCount: 0,
failedChangesCount: 0
};
const result = await directoryClient.setAccessControlRecursive(
toAcl(
Expand Down Expand Up @@ -510,7 +510,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
);

batchCounter++;
},
}
}
);

Expand Down Expand Up @@ -565,7 +565,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
continuation = progress.continuationToken;
aborter.abort();
},
abortSignal: aborter.signal,
abortSignal: aborter.signal
}
);
} catch (err) {
Expand All @@ -578,7 +578,7 @@ describe("DataLakePathClient setAccessControlRecursive Node.js only", () => {
"user::rwx,user:ec3595d6-2c17-4696-8caa-7e139758d24a:rw-,group::rw-,mask::rwx,other::---"
),
{
continuationToken: continuation,
continuationToken: continuation
}
);

Expand Down

0 comments on commit 24f3325

Please sign in to comment.