tests/krb5: Allow specifying options and expected flags when obtaining a ticket