Skip to content

Commit

Permalink
bugfix related to logging creation
Browse files Browse the repository at this point in the history
  • Loading branch information
LegenJCdary authored and cinek810 committed Mar 17, 2022
1 parent d205032 commit 06ad96c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansible_deployer/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def main():

if len(sys.argv) < 2:
print("[ERROR]: Too few arguments", file=sys.stderr)
logger.error("Program will exit now.")
print("[ERROR]: Program will exit now.")
sys.exit(2)
options = parse_options(sys.argv[1:])
logger = set_logging(options)
Expand Down
2 changes: 1 addition & 1 deletion tests/01-test_argument_parsing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source ./tests/testing_lib.sh

echo -e " ___ _ _ _\n / _ \/ | __ _ _ __ __ _ _ _ _ __ ___ ___ _ __ | |_ _ __ __ _ _ __ ___(_)_ __ __ _\n | | | | | _____ / _\` | '__/ _\` | | | | '_ \` _ \ / _ \ '_ \| __| | '_ \ / _\` | '__/ __| | '_ \ / _\` |\n | |_| | | |_____| | (_| | | | (_| | |_| | | | | | | __/ | | | |_ | |_) | (_| | | \__ \ | | | | (_| |\n \___/|_| \__,_|_| \__, |\__,_|_| |_| |_|\___|_| |_|\__| | .__/ \__,_|_| |___/_|_| |_|\__, |\n |___/ |_| |___/\n _ _ _ _\n __ ___ __ ___ _ __ __ _ ___ ___ _ __ ___ | |__ (_)_ __ __ _| |_(_) ___ _ __ ___\n \ \ /\ / / '__/ _ \| '_ \ / _\` | / __/ _ \| '_ \` _ \| '_ \| | '_ \ / _\` | __| |/ _ \| '_ \/ __|\n \ V V /| | | (_) | | | | (_| | | (_| (_) | | | | | | |_) | | | | | (_| | |_| | (_) | | | \__ \\n \_/\_/ |_| \___/|_| |_|\__, | \___\___/|_| |_| |_|_.__/|_|_| |_|\__,_|\__|_|\___/|_| |_|___/\n |___/\n \n"
#Check wrong combinations
check_message_in_output 'ansible-deployer' 'Too few arguments'
check_message_in_output 'ansible-deployer' '\[ERROR\]: Too few arguments'
check_message_in_output 'ansible-deployer run' '\[ERROR\]: task is required for run'
check_message_in_output 'ansible-deployer run' '\[ERROR\]: infra is required for run'
check_message_in_output 'ansible-deployer run' '\[ERROR\]: stage is required for run'
Expand Down

0 comments on commit 06ad96c

Please sign in to comment.