mirror of https://github.com/certd/certd
fix: 修改ssh privateKey参数名
parent
84e26381b5
commit
466d659f6e
|
@ -17,7 +17,7 @@ export class SSHAccessProvider {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
password: { desc: '登录密码' },
|
password: { desc: '登录密码' },
|
||||||
publicKey: {
|
privateKey: {
|
||||||
desc: '密钥,密码或此项必填一项'
|
desc: '密钥,密码或此项必填一项'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,4 +36,17 @@ describe('HostShellExecute', function () {
|
||||||
expect(ret).ok
|
expect(ret).ok
|
||||||
console.log('-----' + JSON.stringify(ret))
|
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))
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue