. "${srcdir}/test/oauth/common.sh"
expect_no_creds() {
- cat /dev/null > "${testname}.expected-creds"
+ cat /dev/null > "${MHTMPDIR}/$$.expected-creds"
cat /dev/null > "${MHTMPDIR}/oauth-test"
chmod 600 "${MHTMPDIR}/oauth-test"
}
test_mhlogin() {
start_fakehttp
- run_test 'eval echo code | mhlogin -oauth test' \
+ run_test 'eval echo code | mhlogin -saslmech xoauth2 -authservice test' \
"Load the following URL in your browser and authorize nmh to access test:
http://127.0.0.1:${http_port}/oauth/auth?response_type=code&client_id=test-id&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=test-scope
test_mhlogin 'mhlogin: error exchanging code for OAuth2 token
mhlogin: bad OAuth request; re-run with -snoop and send REDACTED output to nmh-workers'
+clean_fakehttp
+
exit ${failed:-0}