Skip to content

Commit

Permalink
Merge branch 'main' into update-contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh authored Apr 19, 2023
2 parents c1e5b8f + 5fa129e commit 31629e9
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 410 deletions.
1 change: 0 additions & 1 deletion agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ util-scripts = \
# Scripts based on the Python Click package, which are generated during
# installation.
click-scripts = \
pbench-generate-token \
pbench-cleanup \
pbench-clear-results \
pbench-clear-tools \
Expand Down
8 changes: 8 additions & 0 deletions contrib/containerized-pbench/pbench_demo
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ export PB_AGENT_IMAGE_NAME=quay.io/pbench/pbench-agent-all-fedora-36:main

mkdir -p "${FIOTEST}"

# Before we run the demo, we need a Pbench API key. The key can be an
# environment variable of PBENCH_API_KEY or need to be supplied to this
# script as an argument.
api_key=${1:-${PBENCH_API_KEY}}
if [[ -z "${api_key}" ]]; then
echo "Pbench API key must be provided, either on the command line or via the PBENCH_API_KEY environment variable"
exit 2
fi
#+
# Run the demo!
#-
Expand Down
95 changes: 0 additions & 95 deletions lib/pbench/cli/agent/commands/generate_token.py

This file was deleted.

224 changes: 0 additions & 224 deletions lib/pbench/test/unit/agent/task/test_generate_token.py

This file was deleted.

24 changes: 24 additions & 0 deletions lib/pbench/test/unit/agent/task/test_results_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,30 @@ def test_multiple_meta_args_single_option():
assert result.exit_code == 0, result.stderr
assert result.stdout == ""

@staticmethod
@responses.activate
def test_multiple_meta_args():
"""Test normal operation when all arguments and options are specified"""

TestResultsPush.add_http_mock_response()
runner = CliRunner(mix_stderr=False)
result = runner.invoke(
main,
args=[
TestResultsPush.TOKN_SWITCH,
TestResultsPush.TOKN_TEXT,
TestResultsPush.ACCESS_SWITCH,
TestResultsPush.ACCESS_TEXT,
TestResultsPush.META_SWITCH,
TestResultsPush.META_TEXT_TEST,
TestResultsPush.META_SWITCH,
TestResultsPush.META_TEXT_FOO,
tarball,
],
)
assert result.exit_code == 0, result.stderr
assert result.stderr == ""

@staticmethod
@responses.activate
def test_token_omitted():
Expand Down
Loading

0 comments on commit 31629e9

Please sign in to comment.