From ef837f003400aaa57fa5f1e75de1b441c34a2283 Mon Sep 17 00:00:00 2001 From: Katy Bowman Date: Fri, 6 Dec 2024 10:10:39 -0500 Subject: [PATCH] test: test fixes for spaces:info and spaces:wait --- packages/cli/test/fixtures/spaces/fixtures.ts | 6 +++--- .../cli/test/unit/commands/spaces/info.unit.test.ts | 12 ++++++------ .../cli/test/unit/commands/spaces/wait.unit.test.ts | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/cli/test/fixtures/spaces/fixtures.ts b/packages/cli/test/fixtures/spaces/fixtures.ts index 420691c9f1..286a367c06 100644 --- a/packages/cli/test/fixtures/spaces/fixtures.ts +++ b/packages/cli/test/fixtures/spaces/fixtures.ts @@ -21,7 +21,7 @@ export const spaces: Record = { organization: { name: 'my-org', }, - generation: 'cedar', + generation: {id: '123', name: 'cedar'}, created_at: '2016-01-06T03:23:13Z', updated_at: '2016-01-06T03:23:13Z', }, @@ -43,7 +43,7 @@ export const spaces: Record = { organization: { name: 'my-org', }, - generation: 'cedar', + generation: {id: '123', name: 'cedar'}, created_at: '2016-01-06T03:23:13Z', updated_at: '2016-01-06T03:23:13Z', }, @@ -66,7 +66,7 @@ export const spaces: Record = { organization: { name: 'my-org', }, - generation: 'cedar', + generation: {id: '123', name: 'cedar'}, created_at: '2016-01-06T03:23:13Z', updated_at: '2016-01-06T03:23:13Z', }, diff --git a/packages/cli/test/unit/commands/spaces/info.unit.test.ts b/packages/cli/test/unit/commands/spaces/info.unit.test.ts index ae5770eba9..e396759429 100644 --- a/packages/cli/test/unit/commands/spaces/info.unit.test.ts +++ b/packages/cli/test/unit/commands/spaces/info.unit.test.ts @@ -34,7 +34,7 @@ describe('spaces:info', function () { Data CIDR: ${space.data_cidr} State: ${space.state} Shield: off - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${space.created_at} `)) }) @@ -74,7 +74,7 @@ describe('spaces:info', function () { State: ${space.state} Shield: off Outbound IPs: 123.456.789.123 - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${space.created_at} `)) }) @@ -101,7 +101,7 @@ describe('spaces:info', function () { State: ${space.state} Shield: off Outbound IPs: disabled - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${space.created_at} `)) }) @@ -124,7 +124,7 @@ describe('spaces:info', function () { Data CIDR: ${space.data_cidr} State: ${space.state} Shield: off - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${space.created_at} `)) }) @@ -147,7 +147,7 @@ describe('spaces:info', function () { Data CIDR: ${shieldSpace.data_cidr} State: ${shieldSpace.state} Shield: on - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${shieldSpace.created_at} `)) }) @@ -169,7 +169,7 @@ describe('spaces:info', function () { Data CIDR: ${space.data_cidr} State: ${space.state} Shield: off - Generation: ${space.generation} + Generation: ${space.generation.name} Created at: ${space.created_at} `)) }) diff --git a/packages/cli/test/unit/commands/spaces/wait.unit.test.ts b/packages/cli/test/unit/commands/spaces/wait.unit.test.ts index c162491b4b..bf1033f806 100644 --- a/packages/cli/test/unit/commands/spaces/wait.unit.test.ts +++ b/packages/cli/test/unit/commands/spaces/wait.unit.test.ts @@ -56,7 +56,7 @@ describe('spaces:wait', function () { State: ${allocatedSpace.state} Shield: off Outbound IPs: 123.456.789.123 - Generation: ${allocatedSpace.generation} + Generation: ${allocatedSpace.generation.name} Created at: ${allocatedSpace.created_at} `)) expect(notifySpy.called).to.be.true @@ -115,7 +115,7 @@ describe('spaces:wait', function () { Data CIDR: ${allocatedSpace.data_cidr} State: ${allocatedSpace.state} Shield: off - Generation: ${allocatedSpace.generation} + Generation: ${allocatedSpace.generation.name} Created at: ${allocatedSpace.created_at} `)) expect(notifySpy.called).to.be.true