1
0
Fork 0

taking out some tests

pull/83/head
Bryan MacFarlane 2019-08-25 00:26:39 -04:00
parent b7ae833847
commit 17a0aa40f3
1 changed files with 26 additions and 26 deletions

View File

@ -50,34 +50,34 @@ describe('@actions/core', () => {
assertWriteCalls([`##[set-env name=my var2;]var val%0D%0A${os.EOL}`]) assertWriteCalls([`##[set-env name=my var2;]var val%0D%0A${os.EOL}`])
}) })
it('exportSecret produces the correct commands and sets the env', () => { // it('exportSecret produces the correct commands and sets the env', () => {
core.exportSecret('my secret', 'secret val') // core.exportSecret('my secret', 'secret val')
expect(process.env['my secret']).toBe('secret val') // expect(process.env['my secret']).toBe('secret val')
assertWriteCalls([ // assertWriteCalls([
`##[set-env name=my secret;]secret val${os.EOL}`, // `##[set-env name=my secret;]secret val${os.EOL}`,
`##[set-secret]secret val${os.EOL}` // `##[set-secret]secret val${os.EOL}`
]) // ])
}) // })
it('exportSecret escapes secret names', () => { // it('exportSecret escapes secret names', () => {
core.exportSecret('special char secret \r\n];', 'special secret val') // core.exportSecret('special char secret \r\n];', 'special secret val')
expect(process.env['special char secret \r\n];']).toBe('special secret val') // expect(process.env['special char secret \r\n];']).toBe('special secret val')
assertWriteCalls([ // assertWriteCalls([
`##[set-env name=special char secret %0D%0A%5D%3B;]special secret val${ // `##[set-env name=special char secret %0D%0A%5D%3B;]special secret val${
os.EOL // os.EOL
}`, // }`,
`##[set-secret]special secret val${os.EOL}` // `##[set-secret]special secret val${os.EOL}`
]) // ])
}) // })
it('exportSecret escapes secret values', () => { // it('exportSecret escapes secret values', () => {
core.exportSecret('my secret2', 'secret val\r\n') // core.exportSecret('my secret2', 'secret val\r\n')
expect(process.env['my secret2']).toBe('secret val\r\n') // expect(process.env['my secret2']).toBe('secret val\r\n')
assertWriteCalls([ // assertWriteCalls([
`##[set-env name=my secret2;]secret val%0D%0A${os.EOL}`, // `##[set-env name=my secret2;]secret val%0D%0A${os.EOL}`,
`##[set-secret]secret val%0D%0A${os.EOL}` // `##[set-secret]secret val%0D%0A${os.EOL}`
]) // ])
}) // })
it('prependPath produces the correct commands and sets the env', () => { it('prependPath produces the correct commands and sets the env', () => {
core.addPath('myPath') core.addPath('myPath')