mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 00:26:44 +00:00
fixed substring issue with /github/workspace and /github/file_commands (#35)
* fixed substring issue with /github/workspace and /github/file_commands * npm run format * last 3 parts of the path are mounted to /github/workspace and /github/file_commands * file commands now point to _temp/_runner_file_commands
This commit is contained in:
@@ -103,19 +103,22 @@ describe('k8s utils', () => {
|
||||
|
||||
it('should have container action volumes', () => {
|
||||
let volumes = containerVolumes([], true, true)
|
||||
expect(
|
||||
volumes.find(e => e.mountPath === '/github/workspace')
|
||||
).toBeTruthy()
|
||||
expect(
|
||||
volumes.find(e => e.mountPath === '/github/file_commands')
|
||||
).toBeTruthy()
|
||||
let workspace = volumes.find(e => e.mountPath === '/github/workspace')
|
||||
let fileCommands = volumes.find(
|
||||
e => e.mountPath === '/github/file_commands'
|
||||
)
|
||||
expect(workspace).toBeTruthy()
|
||||
expect(workspace?.subPath).toBe('repo/repo')
|
||||
expect(fileCommands).toBeTruthy()
|
||||
expect(fileCommands?.subPath).toBe('_temp/_runner_file_commands')
|
||||
|
||||
volumes = containerVolumes([], false, true)
|
||||
expect(
|
||||
volumes.find(e => e.mountPath === '/github/workspace')
|
||||
).toBeTruthy()
|
||||
expect(
|
||||
volumes.find(e => e.mountPath === '/github/file_commands')
|
||||
).toBeTruthy()
|
||||
workspace = volumes.find(e => e.mountPath === '/github/workspace')
|
||||
fileCommands = volumes.find(e => e.mountPath === '/github/file_commands')
|
||||
expect(workspace).toBeTruthy()
|
||||
expect(workspace?.subPath).toBe('repo/repo')
|
||||
expect(fileCommands).toBeTruthy()
|
||||
expect(fileCommands?.subPath).toBe('_temp/_runner_file_commands')
|
||||
})
|
||||
|
||||
it('should have externals, github home and github workflow mounts if job container', () => {
|
||||
|
||||
Reference in New Issue
Block a user