mirror of
https://github.com/apache/superset.git
synced 2026-05-07 17:04:58 +00:00
feat(ssh_tunnel): Import/Export Databases with SSHTunnel credentials (#23099)
This commit is contained in:
@@ -146,4 +146,51 @@ describe('ImportModelsModal', () => {
|
||||
);
|
||||
expect(wrapperWithPasswords.find('input[type="password"]')).toExist();
|
||||
});
|
||||
|
||||
it('should render ssh_tunnel password fields when needed for import', () => {
|
||||
const wrapperWithPasswords = mount(
|
||||
<ImportModelsModal
|
||||
{...requiredProps}
|
||||
sshTunnelPasswordFields={['databases/examples.yaml']}
|
||||
/>,
|
||||
{
|
||||
context: { store },
|
||||
},
|
||||
);
|
||||
expect(
|
||||
wrapperWithPasswords.find('[data-test="ssh_tunnel_password"]'),
|
||||
).toExist();
|
||||
});
|
||||
|
||||
it('should render ssh_tunnel private_key fields when needed for import', () => {
|
||||
const wrapperWithPasswords = mount(
|
||||
<ImportModelsModal
|
||||
{...requiredProps}
|
||||
sshTunnelPrivateKeyFields={['databases/examples.yaml']}
|
||||
/>,
|
||||
{
|
||||
context: { store },
|
||||
},
|
||||
);
|
||||
expect(
|
||||
wrapperWithPasswords.find('[data-test="ssh_tunnel_private_key"]'),
|
||||
).toExist();
|
||||
});
|
||||
|
||||
it('should render ssh_tunnel private_key_password fields when needed for import', () => {
|
||||
const wrapperWithPasswords = mount(
|
||||
<ImportModelsModal
|
||||
{...requiredProps}
|
||||
sshTunnelPrivateKeyPasswordFields={['databases/examples.yaml']}
|
||||
/>,
|
||||
{
|
||||
context: { store },
|
||||
},
|
||||
);
|
||||
expect(
|
||||
wrapperWithPasswords.find(
|
||||
'[data-test="ssh_tunnel_private_key_password"]',
|
||||
),
|
||||
).toExist();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user