iXsystems / ixautomation

Test framework for iX projects
BSD 2-Clause "Simplified" License
6 stars 1 forks source link

Add middlewared tests #51

Closed pkgdemon closed 6 years ago

pkgdemon commented 6 years ago

https://github.com/iXsystems/ixbuild/blob/master/freenas/scripts/api-v2.0-tests.sh

pkgdemon commented 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
ericbsd commented 6 years ago

It is working, but because of the password issue, we are most of the test failed.