tests: Fix authsrv_errors_1 and authsrv_errors_3 when running on host

Use a non-existing directory in the path to avoid SQLite from being able
to create a new database file. The previous design worked in the VM case
due to the host file system being read-only, but a bit more is needed
for the case when this is running on the host.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-03-07 18:13:05 +02:00 committed by Jouni Malinen
parent a1f11e34c4
commit 732b57acb4

View file

@ -170,7 +170,7 @@ def test_authsrv_oom(dev, apdev):
def test_authsrv_errors_1(dev, apdev):
"""Authentication server errors (1)"""
params = authsrv_params()
params["eap_user_file"] = "sqlite:auth_serv/does-not-exist"
params["eap_user_file"] = "sqlite:auth_serv/does-not-exist/does-not-exist"
authsrv = hostapd.add_ap(apdev[1], params, no_enable=True)
if "FAIL" not in authsrv.request("ENABLE"):
raise Exception("ENABLE succeeded with invalid SQLite EAP user file")
@ -186,7 +186,7 @@ def test_authsrv_errors_2(dev, apdev):
def test_authsrv_errors_3(dev, apdev):
"""Authentication server errors (3)"""
params = authsrv_params()
params["eap_sim_db"] = "unix:/tmp/hlr_auc_gw.sock db=auth_serv/does-not-exist"
params["eap_sim_db"] = "unix:/tmp/hlr_auc_gw.sock db=auth_serv/does-not-exist/does-not-exist"
authsrv = hostapd.add_ap(apdev[1], params, no_enable=True)
if "FAIL" not in authsrv.request("ENABLE"):
raise Exception("ENABLE succeeded with invalid RADIUS client file")