diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /qa/workunits/cephadm/test_repos.sh | |
parent | Initial commit. (diff) | |
download | ceph-upstream/16.2.11+ds.tar.xz ceph-upstream/16.2.11+ds.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/workunits/cephadm/test_repos.sh')
-rwxr-xr-x | qa/workunits/cephadm/test_repos.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/qa/workunits/cephadm/test_repos.sh b/qa/workunits/cephadm/test_repos.sh new file mode 100755 index 000000000..4b0749231 --- /dev/null +++ b/qa/workunits/cephadm/test_repos.sh @@ -0,0 +1,35 @@ +#!/bin/bash -ex + +SCRIPT_NAME=$(basename ${BASH_SOURCE[0]}) +SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) +CEPHADM_SRC_DIR=${SCRIPT_DIR}/../../../src/cephadm +CEPHADM=${CEPHADM_SRC_DIR}/cephadm + +# this is a pretty weak test, unfortunately, since the +# package may also be in the base OS. +function test_install_uninstall() { + ( sudo apt update && \ + sudo apt -y install cephadm && \ + sudo $CEPHADM install && \ + sudo apt -y remove cephadm ) || \ + ( sudo yum -y install cephadm && \ + sudo $CEPHADM install && \ + sudo yum -y remove cephadm ) || \ + ( sudo dnf -y install cephadm && \ + sudo $CEPHADM install && \ + sudo dnf -y remove cephadm ) +} + +sudo $CEPHADM -v add-repo --release octopus +test_install_uninstall +sudo $CEPHADM -v rm-repo + +sudo $CEPHADM -v add-repo --dev main +test_install_uninstall +sudo $CEPHADM -v rm-repo + +sudo $CEPHADM -v add-repo --release 15.2.7 +test_install_uninstall +sudo $CEPHADM -v rm-repo + +echo OK. |