Skip to content

Commit

Permalink
fix app status asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Feb 21, 2025
1 parent 41907db commit ea1f3ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions ts/test/local/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ test("Local Conductor - get app info with app ws", async (t) => {
const appWs = await conductor.connectAppWs(issued.token, port);
const appInfo = await appWs.appInfo();
assert(appInfo);
t.deepEqual(appInfo.status, "running");
t.deepEqual(appInfo.status, { type: "running" });
await conductor.shutDown();
await stopLocalServices(servicesProcess);
await cleanAllConductors();
Expand All @@ -246,7 +246,7 @@ test("Local Conductor - get app info with app agent ws", async (t) => {
.issueAppAuthenticationToken({ installed_app_id: app.installed_app_id });
const appWs = await conductor.connectAppWs(issued.token, port);
const appInfo = await appWs.appInfo();
t.deepEqual(appInfo.status, "running");
t.deepEqual(appInfo.status, { type: "running" });
await conductor.shutDown();
await stopLocalServices(servicesProcess);
await cleanAllConductors();
Expand Down Expand Up @@ -290,7 +290,7 @@ test("Local Conductor - install app with deferred memproofs", async (t) => {
let appInfo = await appWs.appInfo();
t.deepEqual(
appInfo.status,
{ disabled: { reason: "never_started" } },
{ type: "disabled", value: { reason: { type: "never_started" } } },
"app status is never_started"
);

Expand All @@ -302,7 +302,7 @@ test("Local Conductor - install app with deferred memproofs", async (t) => {
.enableApp({ installed_app_id: app.installed_app_id });

appInfo = await appWs.appInfo();
t.equal(appInfo.status, "running", "app status is running");
t.deepEqual(appInfo.status, { type: "running" }, "app status is running");

await conductor.shutDown();
await stopLocalServices(servicesProcess);
Expand Down
2 changes: 1 addition & 1 deletion ts/test/trycp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ test("TryCP Server - App API - get app info", async (t) => {

const appInfo = await appWs.appInfo();
assert(appInfo);
t.deepEqual(appInfo.status, "running");
t.deepEqual(appInfo.status, { type: "running" });

await conductor.disconnectAppInterface(port);
await conductor.shutDown();
Expand Down
10 changes: 5 additions & 5 deletions ts/test/trycp/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ test("TryCP Conductor - install app with deferred memproofs", async (t) => {
assert(appInfo);
t.deepEqual(
appInfo.status,
{ disabled: { reason: "never_started" } },
{ type: "disabled", value: { reason: { type: "never_started" } } },
"app status is never_started"
);

Expand All @@ -278,7 +278,7 @@ test("TryCP Conductor - install app with deferred memproofs", async (t) => {

appInfo = await appWs.appInfo();
assert(appInfo);
t.equal(appInfo.status, "running", "app status is running");
t.deepEqual(appInfo.status, { type: "running" }, "app status is running");

await stopLocalServices(servicesProcess);
await client.cleanUp();
Expand Down Expand Up @@ -676,7 +676,7 @@ test("TryCP Conductor - create and read an entry using the entry zome", async (t
});
t.deepEqual(
enabledAppResponse.app.status,
"running",
{ type: "running" },
"enabled app response matches 'running'"
);

Expand Down Expand Up @@ -812,15 +812,15 @@ test("TryCP Conductor - create and read an entry using the entry zome, 1 conduct
});
t.deepEqual(
enabledAppResponse1.app.status,
"running",
{ type: "running" },
"enabled app response 1 matches 'running'"
);
const enabledAppResponse2 = await conductor.adminWs().enableApp({
installed_app_id: appId2,
});
t.deepEqual(
enabledAppResponse2.app.status,
"running",
{ type: "running" },
"enabled app response 2 matches 'running'"
);

Expand Down

0 comments on commit ea1f3ba

Please sign in to comment.