aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mm_auth/mm_auth_test.ok
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-30 11:22:24 +0200
committerHarald Welte <laforge@gnumonks.org>2016-03-31 11:56:00 +0200
commit37984bdb1b507446421e5aa6131ccdf117dd269f (patch)
treee7dea62884366f31181d35f85f9d15b3c5871114 /openbsc/tests/mm_auth/mm_auth_test.ok
parent56ea30ff3f9f98a4903d060196b185ce124d7eaa (diff)
Add MM Auth test; add auth_action_str() function
Add basic MM Authentication test setup, with fake DB access and RAND_bytes(). So far implement simple tests for IO error during DB access and missing auth entry. To print the auth action during tests, add struct auth_action_names and auth_action_str() inline function in auth.[hc].
Diffstat (limited to 'openbsc/tests/mm_auth/mm_auth_test.ok')
-rw-r--r--openbsc/tests/mm_auth/mm_auth_test.ok8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/tests/mm_auth/mm_auth_test.ok b/openbsc/tests/mm_auth/mm_auth_test.ok
new file mode 100644
index 000000000..5efb3deca
--- /dev/null
+++ b/openbsc/tests/mm_auth/mm_auth_test.ok
@@ -0,0 +1,8 @@
+
+* test_error()
+wrapped: db_get_authinfo_for_subscr(): rc = -5
+auth_get_tuple_for_subscr(key_seq=0) --> auth_action == (internal error)
+
+* test_auth_not_avail()
+wrapped: db_get_authinfo_for_subscr(): rc = -2
+auth_get_tuple_for_subscr(key_seq=0) --> auth_action == AUTH_NOT_AVAIL