cache test and action description for kuber storage class
							parent
							
								
									1ab37c64da
								
							
						
					
					
						commit
						8f516da4da
					
				|  | @ -149,7 +149,7 @@ inputs: | ||||||
|   kubeStorageClass: |   kubeStorageClass: | ||||||
|     default: '' |     default: '' | ||||||
|     required: false |     required: false | ||||||
|     description: '' # Storage class to use for cloud runner jobs, default is empty which will install a ceph based Rook storage and use that. Standard is a very common alternative to use a cloud provider's built in storage |     description: 'Kubernetes storage class to use for cloud runner jobs, leave empty to install rook cluster.' | ||||||
|   kubeVolumeSize: |   kubeVolumeSize: | ||||||
|     default: '5Gi' |     default: '5Gi' | ||||||
|     required: false |     required: false | ||||||
|  |  | ||||||
|  | @ -13,6 +13,7 @@ describe('Cloud Runner', () => { | ||||||
|   const testSecretValue = 'testSecretValue'; |   const testSecretValue = 'testSecretValue'; | ||||||
|   if (Input.cloudRunnerTests) { |   if (Input.cloudRunnerTests) { | ||||||
|     it('All build parameters sent to cloud runner as env vars', async () => { |     it('All build parameters sent to cloud runner as env vars', async () => { | ||||||
|  |       // build parameters
 | ||||||
|       Input.cliOptions = { |       Input.cliOptions = { | ||||||
|         versioning: 'None', |         versioning: 'None', | ||||||
|         projectPath: 'test-project', |         projectPath: 'test-project', | ||||||
|  | @ -27,9 +28,12 @@ describe('Cloud Runner', () => { | ||||||
|         `,
 |         `,
 | ||||||
|       }; |       }; | ||||||
|       Input.githubInputEnabled = false; |       Input.githubInputEnabled = false; | ||||||
|  |       // setup parameters
 | ||||||
|       const buildParameter = await BuildParameters.create(); |       const buildParameter = await BuildParameters.create(); | ||||||
|       const baseImage = new ImageTag(buildParameter); |       const baseImage = new ImageTag(buildParameter); | ||||||
|  |       // run the job
 | ||||||
|       const file = await CloudRunner.run(buildParameter, baseImage.toString()); |       const file = await CloudRunner.run(buildParameter, baseImage.toString()); | ||||||
|  |       // assert results
 | ||||||
|       expect(file).toContain(JSON.stringify(buildParameter)); |       expect(file).toContain(JSON.stringify(buildParameter)); | ||||||
|       expect(file).toContain(`${Input.ToEnvVarFormat(testSecretName)}=${testSecretValue}`); |       expect(file).toContain(`${Input.ToEnvVarFormat(testSecretName)}=${testSecretValue}`); | ||||||
|       const environmentVariables = TaskParameterSerializer.readBuildEnvironmentVariables(); |       const environmentVariables = TaskParameterSerializer.readBuildEnvironmentVariables(); | ||||||
|  | @ -46,5 +50,20 @@ describe('Cloud Runner', () => { | ||||||
|       } |       } | ||||||
|       Input.githubInputEnabled = true; |       Input.githubInputEnabled = true; | ||||||
|     }, 1000000); |     }, 1000000); | ||||||
|  |     it('Run one build it should not use cache, run subsequent build which should use cache', async () => { | ||||||
|  |       Input.cliOptions = { | ||||||
|  |         versioning: 'None', | ||||||
|  |         projectPath: 'test-project', | ||||||
|  |         unityVersion: UnityVersioning.read('test-project'), | ||||||
|  |       }; | ||||||
|  |       Input.githubInputEnabled = false; | ||||||
|  |       const buildParameter = await BuildParameters.create(); | ||||||
|  |       const baseImage = new ImageTag(buildParameter); | ||||||
|  |       const results = await CloudRunner.run(buildParameter, baseImage.toString()); | ||||||
|  |       expect(results).toContain('library not included'); | ||||||
|  |       const results2 = await CloudRunner.run(buildParameter, baseImage.toString()); | ||||||
|  |       expect(results2).toContain('library included'); | ||||||
|  |       Input.githubInputEnabled = true; | ||||||
|  |     }, 1000000); | ||||||
|   } |   } | ||||||
| }); | }); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue