<commit_before>#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/util.sh"
os::log::install_errexit

# This test validates the export command

oc new-app -f examples/sample-app/application-template-stibuild.json --name=sample

oc export all --all-namespaces

# make sure the deprecated flag doesn't fail
oc export all --all

[ "$(oc export svc --template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | wc -l)" -ne 0 ]
[ "$(oc export svc --as-template=template | grep 'kind: Template')" ]
[ ! "$(oc export svc | grep 'clusterIP')" ]<commit_msg>test/cmd/export.sh shouldn't dump everything to STDOUT<commit_after>#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/util.sh"
os::log::install_errexit

# This test validates the export command

oc new-app -f examples/sample-app/application-template-stibuild.json --name=sample

[ "$(oc export all --all-namespaces)" ]
# make sure the deprecated flag doesn't fail
[ "$(oc export all --all)" ]

[ "$(oc export svc --template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | wc -l)" -ne 0 ]
[ "$(oc export svc --as-template=template | grep 'kind: Template')" ]
[ ! "$(oc export svc | grep 'clusterIP')" ]
{'fraction_non_alphanumeric': 0.19571865443425077, 'fraction_numerical': 0.0015290519877675841, 'mean_word_length': 4.194444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4780085', 'n_tokens_mistral': 475, 'n_tokens_neox': 449, 'n_words': 129}