Skip to content

Commit

Permalink
Re-enable features for space creation (#3067)
Browse files Browse the repository at this point in the history
  • Loading branch information
eablack authored Nov 1, 2024
1 parent bd8a15e commit 086dfb1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/commands/spaces/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class Create extends Command {
channel: flags.string({hidden: true}),
cidr: flags.string({description: 'RFC-1918 CIDR the space will use'}),
'data-cidr': flags.string({description: 'RFC-1918 CIDR used by Heroku Data resources for the space'}),
// features: flags.string({hidden: true, description: 'a list of features separated by commas'}),
features: flags.string({hidden: true, description: 'a list of features separated by commas'}),
generation: flags.string({description: 'generation for space', default: 'cedar', options: ['cedar', 'fir']}),
'kpi-url': flags.string({hidden: true, description: 'self-managed KPI endpoint to use'}),
'log-drain-url': flags.string({hidden: true, description: 'direct log drain url'}),
Expand Down Expand Up @@ -71,7 +71,7 @@ export default class Create extends Command {
channel_name: channel,
cidr,
data_cidr: dataCidr,
// features: splitCsv(features),
features: splitCsv(features),
generation,
kpi_url: kpiUrl,
log_drain_url: logDrainUrl,
Expand Down
38 changes: 19 additions & 19 deletions packages/cli/test/unit/commands/spaces/create.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('spaces:create', function () {
it('creates a Standard space', async function () {
const api = nock('https://api.heroku.com', {reqheaders: {Accept: 'application/vnd.heroku+json; version=3.sdk'}})
.post('/spaces', {
// features: features,
features: features,
generation: 'cedar',
name: 'my-space',
region: 'my-region',
Expand All @@ -27,7 +27,7 @@ describe('spaces:create', function () {
name: 'my-space',
team: {name: 'my-team'},
region: {name: 'my-region'},
// features: ['one', 'two'],
features: ['one', 'two'],
generation: 'cedar',
state: 'allocated',
created_at: now,
Expand All @@ -39,7 +39,7 @@ describe('spaces:create', function () {
'--team=my-team',
'--space=my-space',
'--region=my-region',
// '--features=one, two',
'--features=one, two',
])

api.done()
Expand All @@ -61,7 +61,7 @@ describe('spaces:create', function () {
it('shows Standard Private Space Add-on cost warning', async function () {
const api = nock('https://api.heroku.com', {reqheaders: {Accept: 'application/vnd.heroku+json; version=3.sdk'}})
.post('/spaces', {
// features: features,
features: features,
generation: 'cedar',
name: 'my-space',
region: 'my-region',
Expand All @@ -72,7 +72,7 @@ describe('spaces:create', function () {
name: 'my-space',
team: {name: 'my-team'},
region: {name: 'my-region'},
// features: ['one', 'two'],
features: ['one', 'two'],
generation: 'cedar',
state: 'allocated',
created_at: now,
Expand All @@ -84,7 +84,7 @@ describe('spaces:create', function () {
'--team=my-team',
'--space=my-space',
'--region=my-region',
// '--features=one, two',
'--features=one, two',
])

api.done()
Expand All @@ -97,7 +97,7 @@ describe('spaces:create', function () {
it('creates a Shield space', async function () {
const api = nock('https://api.heroku.com', {reqheaders: {Accept: 'application/vnd.heroku+json; version=3.sdk'}})
.post('/spaces', {
// features: features,
features: features,
generation: 'cedar',
name: 'my-space',
region: 'my-region',
Expand All @@ -109,7 +109,7 @@ describe('spaces:create', function () {
name: 'my-space',
team: {name: 'my-team'},
region: {name: 'my-region'},
// features: ['one', 'two'],
features: ['one', 'two'],
generation: 'cedar',
state: 'allocated',
created_at: now,
Expand All @@ -121,7 +121,7 @@ describe('spaces:create', function () {
'--team=my-team',
'--space=my-space',
'--region=my-region',
// '--features=one, two',
'--features=one, two',
'--shield',
])

Expand All @@ -144,7 +144,7 @@ describe('spaces:create', function () {
it('shows Shield Private Space Add-on cost warning', async function () {
const api = nock('https://api.heroku.com', {reqheaders: {Accept: 'application/vnd.heroku+json; version=3.sdk'}})
.post('/spaces', {
// features: features,
features: features,
generation: 'cedar',
name: 'my-space',
region: 'my-region',
Expand All @@ -156,7 +156,7 @@ describe('spaces:create', function () {
name: 'my-space',
team: {name: 'my-team'},
region: {name: 'my-region'},
// features: ['one', 'two'],
features: ['one', 'two'],
generation: 'cedar',
state: 'allocated',
created_at: now,
Expand All @@ -168,7 +168,7 @@ describe('spaces:create', function () {
'--team=my-team',
'--space=my-space',
'--region=my-region',
// '--features=one, two',
'--features=one, two',
'--shield',
])

Expand All @@ -184,7 +184,7 @@ describe('spaces:create', function () {
.post('/spaces', {
cidr: '10.0.0.0/24',
data_cidr: '172.23.0.0/28',
// features: features,
features: features,
generation: 'cedar',
name: 'my-space',
region: 'my-region',
Expand All @@ -195,7 +195,7 @@ describe('spaces:create', function () {
name: 'my-space',
team: {name: 'my-team'},
region: {name: 'my-region'},
// features: ['one', 'two'],
features: ['one', 'two'],
state: 'allocated',
created_at: now,
cidr: '10.0.0.0/24',
Expand All @@ -206,7 +206,7 @@ describe('spaces:create', function () {
'--team=my-team',
'--space=my-space',
'--region=my-region',
// '--features=one, two',
'--features=one, two',
'--cidr=10.0.0.0/24',
'--data-cidr=172.23.0.0/28',
])
Expand All @@ -231,7 +231,7 @@ describe('spaces:create', function () {
cidr: '10.0.0.0/16',
created_at: now,
data_cidr: '172.23.0.0/20',
// features: ['one', 'two'],
features: ['one', 'two'],
generation: 'fir',
name: 'my-space',
region: {name: 'my-region'},
Expand All @@ -241,7 +241,7 @@ describe('spaces:create', function () {
}
nock('https://api.heroku.com', {reqheaders: {Accept: 'application/vnd.heroku+json; version=3.sdk'}})
.post('/spaces', {
// features: firSpace.features,
features: firSpace.features,
generation: firSpace.generation,
name: firSpace.name,
region: firSpace.region.name,
Expand All @@ -256,8 +256,8 @@ describe('spaces:create', function () {
firSpace.name,
'--region',
firSpace.region.name,
// '--features',
// firSpace.features.join(','),
'--features',
firSpace.features.join(','),
'--generation',
firSpace.generation,
])
Expand Down

0 comments on commit 086dfb1

Please sign in to comment.