-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a31896b
commit eba396b
Showing
6 changed files
with
72 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/model/cloud-runner/tests/e2e/cloud-runner-kubernetes.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import CloudRunner from '../../cloud-runner'; | ||
import UnityVersioning from '../../../unity-versioning'; | ||
import { Cli } from '../../../cli/cli'; | ||
import CloudRunnerLogger from '../../services/core/cloud-runner-logger'; | ||
import { v4 as uuidv4 } from 'uuid'; | ||
import CloudRunnerOptions from '../../options/cloud-runner-options'; | ||
import setups from '../cloud-runner-suite.test'; | ||
import BuildParameters from '../../../build-parameters'; | ||
import ImageTag from '../../../image-tag'; | ||
|
||
async function CreateParameters(overrides: any) { | ||
if (overrides) { | ||
Cli.options = overrides; | ||
} | ||
|
||
return await BuildParameters.create(); | ||
} | ||
|
||
describe('Cloud Runner Kubernetes', () => { | ||
it('Responds', () => {}); | ||
setups(); | ||
if (CloudRunnerOptions.cloudRunnerDebug) { | ||
it('Run one build it using K8s without error', async () => { | ||
if (CloudRunnerOptions.providerStrategy !== `k8s`) { | ||
return; | ||
} | ||
const overrides = { | ||
versioning: 'None', | ||
projectPath: 'test-project', | ||
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')), | ||
targetPlatform: 'StandaloneLinux64', | ||
cacheKey: `test-case-${uuidv4()}`, | ||
containerHookFiles: `debug-cache`, | ||
}; | ||
const buildParameter = await CreateParameters(overrides); | ||
expect(buildParameter.projectPath).toEqual(overrides.projectPath); | ||
|
||
const baseImage = new ImageTag(buildParameter); | ||
const results = await CloudRunner.run(buildParameter, baseImage.toString()); | ||
const libraryString = 'Rebuilding Library because the asset database could not be found!'; | ||
const cachePushFail = 'Did not push source folder to cache because it was empty Library'; | ||
const buildSucceededString = 'Build succeeded'; | ||
|
||
expect(results).toContain(libraryString); | ||
expect(results).toContain(buildSucceededString); | ||
expect(results).not.toContain(cachePushFail); | ||
|
||
CloudRunnerLogger.log(`run 1 succeeded`); | ||
}, 1_000_000_000); | ||
} | ||
}); |