Skip to content

tests: Catch errors during tests setup #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ elif [ -f /etc/fedora-release ]; then
dnf -y install $COMPILER python3-{gssapi,requests{,-gssapi},flake8} \
krb5-{server,workstation,pkinit} curl libfaketime \
{httpd,krb5,openssl,gssntlmssp}-devel {socket,nss}_wrapper \
autoconf automake libtool which bison make python3 \
autoconf automake libtool which bison make python3 python3-devel \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok to me but I'd defer to @frozencemetery on this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine :)

flex mod_session redhat-rpm-config /usr/bin/virtualenv
else
echo "Distro not found!"
Expand Down
8 changes: 7 additions & 1 deletion tests/magtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,11 @@ def test_mech_name(testdir, testenv, logfile):

processes = dict()
logfile = open(os.path.join(testdir, 'tests.log'), 'w')
errs = 0
# '-1' indicates setup phase
errs = -1

try:
# prepare environment for tests
wrapenv = apply_venv(setup_wrappers(testdir))

kdcproc, kdcenv = setup_kdc(testdir, wrapenv)
Expand All @@ -815,6 +818,9 @@ def test_mech_name(testdir, testenv, logfile):

testenv['DELEGCCACHE'] = os.path.join(testdir, 'httpd',
USR_NAME + '@' + TESTREALM)
# making testing
errs = 0

errs += test_spnego_auth(testdir, testenv, logfile)

testenv['MAG_GSS_NAME'] = USR_NAME + '@' + TESTREALM
Expand Down