Use cache key to segment lock folders
parent
efc2e075b0
commit
c25b380ea3
|
|
@ -4,6 +4,16 @@ import setups from './cloud-runner-suite.test';
|
||||||
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import CloudRunnerOptions from '../cloud-runner-options';
|
import CloudRunnerOptions from '../cloud-runner-options';
|
||||||
|
import UnityVersioning from '../../unity-versioning';
|
||||||
|
import BuildParameters from '../../build-parameters';
|
||||||
|
|
||||||
|
async function CreateParameters(overrides) {
|
||||||
|
if (overrides) {
|
||||||
|
Cli.options = overrides;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await BuildParameters.create();
|
||||||
|
}
|
||||||
|
|
||||||
describe('Cloud Runner Locking', () => {
|
describe('Cloud Runner Locking', () => {
|
||||||
setups();
|
setups();
|
||||||
|
|
@ -11,9 +21,14 @@ describe('Cloud Runner Locking', () => {
|
||||||
if (CloudRunnerOptions.cloudRunnerTests) {
|
if (CloudRunnerOptions.cloudRunnerTests) {
|
||||||
it(`Simple Locking Flow`, async () => {
|
it(`Simple Locking Flow`, async () => {
|
||||||
Cli.options.retainWorkspaces = true;
|
Cli.options.retainWorkspaces = true;
|
||||||
const buildParameters: any = {
|
const overrides: any = {
|
||||||
cacheKey: `test-workspace-${uuidv4()}`,
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
};
|
};
|
||||||
|
const buildParameters = await CreateParameters(overrides);
|
||||||
|
|
||||||
const newWorkspaceName = `test-workspace-${uuidv4()}`;
|
const newWorkspaceName = `test-workspace-${uuidv4()}`;
|
||||||
const runId = uuidv4();
|
const runId = uuidv4();
|
||||||
|
|
@ -37,9 +52,15 @@ describe('Cloud Runner Locking', () => {
|
||||||
}, 150000);
|
}, 150000);
|
||||||
it('All Locking Actions', async () => {
|
it('All Locking Actions', async () => {
|
||||||
Cli.options.retainWorkspaces = true;
|
Cli.options.retainWorkspaces = true;
|
||||||
const buildParameters: any = {
|
const overrides: any = {
|
||||||
cacheKey: `test-workspace-${uuidv4()}`,
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
};
|
};
|
||||||
|
const buildParameters = await CreateParameters(overrides);
|
||||||
|
|
||||||
CloudRunnerLogger.log(
|
CloudRunnerLogger.log(
|
||||||
`GetAllWorkspaces ${JSON.stringify(await SharedWorkspaceLocking.GetAllWorkspaces(buildParameters))}`,
|
`GetAllWorkspaces ${JSON.stringify(await SharedWorkspaceLocking.GetAllWorkspaces(buildParameters))}`,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue