nuodb / migration-tools

Migration tools for NuoDB
http://nuodb.github.com/migration-tools/
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

[MIG-174] Prompt for password if one is not provided in the options #56

Closed rshaull closed 4 years ago

rshaull commented 4 years ago

If source.password and/or target.password are not provided in the options, prompt for them interactively. Password is not echoed.

If Console is not available (i.e., running in IDE or in test) then password cannot be entered interactively and must be provided via options.

Implemented by moving password validation into a new single option-level validation (instead of group-level validation) attached to each password option. This validation interactively prompts for password if not provided in the options, and then throws OptionException if password provided is still empty (after user entry) or if console for interactive entry is unavailable.

A few tests modified to correctly test passing password in options.