You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actor class Orchestrator() = this {
let { phash } = Map;
private stable var pool = Map.new<Principal, Types.CanisterInfo>();
let management = Management.service(Constants.ManagementCanisterId);
// Auth so that only server and admin can talk to this canister
let admin = Principal.fromText("qcjer-cl7l3-dae");
let game_controller = Principal.fromText("7k7-lqlgk-x56ep");
private stable var admins = Vector.fromArray<Principal>([admin, game_controller]);
I then have some tests which look like this
var orchestrator = await Orchestrator();
let caller : Principal = Principal.fromText("wo5qg-ysjiq-5da");
let user1 : Principal = Principal.fromText("kufey-x4r");
let user2 : Principal = Principal.fromText("mm6ly-2yowe");
let user3 : Principal = Principal.fromText("wkvns-5prta");
var admins : Vector<Principal> = Vector.fromArray([caller, user1, user2]);
func resetMocks() : () {
admins := Vector.fromArray([caller, user1, user2]);
};
await suite(
"createEvent",
func() : async () {
await test(
"setEventWasm works correctly",
func() : async () {
resetMocks();
let oldEventWasm = await orchestrator.getEventWasm();
The getEventWasm function requires admin verification so i need to change the admins in my Orchestrator actor class to include this principal wo5qg-ysjiq-5da. have you got a good way of suggesting how I do this? I could pass it as an argument to my actor orchestrator class when i create it i suppose but i was wondering if there might be a better way to do it
The text was updated successfully, but these errors were encountered:
I have an actor class which looks like this
I then have some tests which look like this
The getEventWasm function requires admin verification so i need to change the admins in my Orchestrator actor class to include this principal wo5qg-ysjiq-5da. have you got a good way of suggesting how I do this? I could pass it as an argument to my actor orchestrator class when i create it i suppose but i was wondering if there might be a better way to do it
The text was updated successfully, but these errors were encountered: