fix: 修改ssh privateKey参数名

master
xiaojunnuo 2021-06-09 17:50:18 +08:00
parent 84e26381b5
commit 466d659f6e
2 changed files with 14 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export class SSHAccessProvider {
required: true
},
password: { desc: '登录密码' },
publicKey: {
privateKey: {
desc: '密钥,密码或此项必填一项'
}
}

View File

@ -36,4 +36,17 @@ describe('HostShellExecute', function () {
expect(ret).ok
console.log('-----' + JSON.stringify(ret))
})
it('#execute-publicKey-login', async function () {
this.timeout(10000)
const options = createOptions()
const plugin = new HostShellExecute(options)
const shellOpts = {
props: { script: ['ls'], accessProvider: 'tencent-ssh-base01' },
context: {}
}
const ret = await plugin.doExecute(shellOpts)
expect(ret).ok
console.log('-----' + JSON.stringify(ret))
})
})