Skip to content

Commit

Permalink
[8047] Guarantee test users are removed if rc_switch_user test fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Dec 6, 2024
1 parent 40f563a commit d1223a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unit_tests/src/test_rc_switch_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ TEST_CASE("rc_switch_user can be called multiple times when KW_SWITCH_PROXY_USER
// Create a groupadmin.
const adm::user bob{"test_user_bob", env.rodsZone};
REQUIRE_NOTHROW(adm::client::add_user(conn, bob));
REQUIRE_NOTHROW(adm::client::modify_user(conn, bob, adm::user_password_property{"rods"}));
irods::at_scope_exit remove_test_user_bob{[&conn, &bob] { REQUIRE_NOTHROW(adm::client::remove_user(conn, bob)); }};
REQUIRE_NOTHROW(adm::client::modify_user(conn, bob, adm::user_password_property{"rods"}));
REQUIRE_NOTHROW(adm::client::modify_user(conn, bob, adm::user_type_property{adm::user_type::groupadmin}));

//
Expand Down

0 comments on commit d1223a1

Please sign in to comment.