Skip to content

Commit

Permalink
Extra tests and fix --json argument handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bitonio committed May 10, 2022
1 parent b97b542 commit d8f4ff6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def __init__(self, config_values, configuration, flags=None):
dp_parser.add_argument("--interval", "-i", type=int, default=600,
help="Pulling interval in seconds (default: 600)")
# Placeholder future json vs. flat output
dp_parser.add_argument("--json", "-j", type=bool, default=True, help=argparse.SUPPRESS)
dp_parser.add_argument("--json", "-j", action="store_true", default=True, help=argparse.SUPPRESS)

# dpdh = subparsers.add_parser('dp_devhist', help='Device Posture Device History (experimental)')
# $dpdh.add_argument("device_id")
Expand Down
5 changes: 5 additions & 0 deletions test/cli-eaa.bats
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ CLI="python3 ${BATS_TEST_DIRNAME}/../bin/akamai-eaa"
@test "Device Posture Inventory" {
result="$(${CLI} dp inventory)"
[ "$?" -eq 0 ]
}

@test "Device Posture Inventory (JSON)" {
result="$(${CLI} dp inventory --json)"
[ "$?" -eq 0 ]
}

0 comments on commit d8f4ff6

Please sign in to comment.