#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/completions"
# This test validates basic resource retrieval and command interaction

# test completion command help
os::cmd::expect_success_and_text "oc completion -h" "prints shell code"
# test completion command output
os::cmd::expect_failure_and_text "oc completion" "Shell not specified."
os::cmd::expect_success "oc completion bash"
os::cmd::expect_success "oc completion zsh"
os::cmd::expect_failure_and_text "oc completion test_shell" 'Unsupported shell type "test_shell"'
echo "oc completion: ok"

os::test::junit::declare_suite_end
