Skip to content

Commit

Permalink
Fix tests errors on main (#11)
Browse files Browse the repository at this point in the history
* add missing fields to default linked board in tests

* remove non-existing field in user record
  • Loading branch information
GwendalLaurent authored Oct 7, 2024
1 parent 8ca020d commit f9d620b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/rebar3_grisp_io_common_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ register_user() ->
mnesia:write({eresu_user,
<<"Uuid">>,
<<"Testuser">>,
<<"foo">>,
<<"[email protected]">>,
erlang:system_time(),
null,
Hash,
<<"Max Mustermann">>,
undefined,
Expand All @@ -115,6 +115,9 @@ link_board() ->
<<"1337">>,
<<"Uuid">>,
null,
null,
null,
manual,
null})
end,
mnesia:activity(transaction, AddBoard).
Expand All @@ -125,7 +128,14 @@ setup_policies(PrivDir) ->
operations => '_'},
#{subject => #{uuid => '$1'},
object => #{type => grisp_device, user_id => '$1'},
operations => '_'}],
operations => '_'},
#{subject => #{uuid => '$1',
free_plan => true,
total_user_pkg_count => #{op => '<', value => 1}},
object => #{type => software_update_package,
user_id => '$1'},
operations => [create]
}],
PoliciesString = list_to_binary(io_lib:format("~p.", [Policies])),
PolicyFile = filename:join(PrivDir, "policies.term"),
ok = file:write_file(PolicyFile, PoliciesString),
Expand Down

0 comments on commit f9d620b

Please sign in to comment.