HTTP API testing
How could we test the HTTP API without using the original databases ?
def get(search, db_global_iindex \\ 'data/global_iindex',db_global_mindex \\ 'data/global_mindex') do
{:ok, :global_iindex} = :dets.open_file(:global_iindex, [{:file, db_global_iindex}, {:type, :set}])
{:ok, :global_mindex} = :dets.open_file(:global_mindex, [{:file, db_global_mindex}, {:type, :set}])
We decided to use default parameters for the database names, and to use modified names during testing.
BMA.Blockchain.Memberships.get("totoUser",'test/global_iindex_test','test/global_mindex_test')