ceph/qa/workunits/cephadm/test_repos.sh
Sage Weil 8cdbc8e8e6 qa/workunits/cephadm/test_repos: don't try to use the refspec
This is usually a sha1, and we can't reliably find packages based on
that.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-08 07:33:47 -06:00

29 lines
757 B
Bash
Executable File

#!/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 apt -y remove cephadm ) || \
( sudo yum -y install cephadm && \
sudo yum -y remove cephadm ) || \
( sudo dnf -y install cephadm && \
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 master
test_install_uninstall
sudo $CEPHADM -v rm-repo
echo OK.