Veiko Aasa 3a202af843
samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30

34 lines
897 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
echo "Installing requirements"
sudo apt-get install -yq --no-install-recommends \
python3-pytest python3-pytest-django \
python3-pip firefox smbclient\
xvfb
pip3 install wheel
pip3 install splinter pytest-splinter pytest-bdd pytest-xvfb
echo "Installing geckodriver"
(
DL_DIR=/tmp/gecko
GECKO_VERSION="v0.24.0"
FILENAME="geckodriver-${GECKO_VERSION}-linux64.tar.gz"
GECKO_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKO_VERSION/$FILENAME"
test -e /usr/local/bin/geckodriver && echo "geckodriver already installed" && exit 0
mkdir -p $DL_DIR
cd $DL_DIR
if ! [[ -e $FILENAME ]] ; then
wget --no-clobber \
--continue \
--no-verbose \
"$GECKO_URL"
fi
tar xf $FILENAME
sudo mv geckodriver /usr/local/bin/geckodriver
echo "Done"
)