def test_cmd_mask_password(self):
        hook = SqoopHook()
        self.assertEqual(hook.cmd_mask_password(['--password', 'supersecret']),
                         ['--password', 'MASKED'])

        cmd = ['--target', 'targettable']
        self.assertEqual(hook.cmd_mask_password(cmd), cmd)
    def test_cmd_mask_password(self):
        """
        Tests to verify the hook masking function will correctly mask a user password in Sqoop command.
        """
        hook = SqoopHook()
        self.assertEqual(hook.cmd_mask_password(['--password', 'supersecret']),
                         ['--password', 'MASKED'])

        cmd = ['--target', 'targettable']
        self.assertEqual(hook.cmd_mask_password(cmd), cmd)
Exemplo n.º 3
0
    def test_cmd_mask_password(self):
        hook = SqoopHook()
        self.assertEqual(
            hook.cmd_mask_password(['--password', 'supersecret']),
            ['--password', 'MASKED']
        )

        cmd = ['--target', 'targettable']
        self.assertEqual(
            hook.cmd_mask_password(cmd),
            cmd
        )
Exemplo n.º 4
0
    def test_cmd_mask_password(self):
        """
        Tests to verify the hook masking function will correctly mask a user password in Sqoop command.
        """
        hook = SqoopHook()
        self.assertEqual(
            hook.cmd_mask_password(['--password', 'supersecret']),
            ['--password', 'MASKED']
        )

        cmd = ['--target', 'targettable']
        self.assertEqual(
            hook.cmd_mask_password(cmd),
            cmd
        )