fix: harden task recovery and DR contract handling
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include <bt_executor/recovery_policy.hpp>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
int main() {
|
||||
using namespace bt_executor;
|
||||
assert(!recovery_authorized("", ""));
|
||||
assert(!recovery_authorized("short", "short"));
|
||||
assert(recovery_authorized("sixteen-byte-key!", "sixteen-byte-key!"));
|
||||
assert(!recovery_authorized("sixteen-byte-key!", "sixteen-byte-key?"));
|
||||
assert(!recovery_authorized("sixteen-byte-key!", "sixteen-byte-key!x"));
|
||||
assert(!recovery_authorized(std::string(1025,'x'),std::string(1025,'x')));
|
||||
assert(!recovery_resume_permitted(false,false,false));
|
||||
assert(!recovery_resume_permitted(true,true,false));
|
||||
assert(recovery_resume_permitted(true,false,false));
|
||||
assert(recovery_resume_permitted(false,true,true));
|
||||
}
|
||||
Reference in New Issue
Block a user