Closed pkgdemon closed 6 years ago
We need a middlewared_tests function to do this...
# Set which python, pip versions to use
PYTHON="/usr/bin/env python3.6"
PIP="/usr/bin/env pip3.6"
cd tests/freenas/middlewared-tests/
$PYTHON setup_client.py install --user --single-version-externally-managed --record
echo [Target] > target.conf
echo hostname = ${FNASTESTIP} >> target.conf
echo api = /api/v2.0/ >> target.conf
echo username = "root" >> target.conf
echo password = "testing" >> target.conf
sed -i '' "s|'freenas'|'testing'|g" functional/test_0001_authentication.py
$PYTHON -m pytest -sv functional --junitxml=results/middlewared.xml
It is working, but because of the password issue, we are most of the test failed.
https://github.com/iXsystems/ixbuild/blob/master/freenas/scripts/api-v2.0-tests.sh