Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove feature flag --asset-compute #278

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ class InitCommand extends BaseCommand {
// default project name and services
let projectName = path.basename(process.cwd())
// list of supported service templates
let services = 'AdobeTargetSDK,AdobeAnalyticsSDK,CampaignSDK,McDataServicesSdk,AudienceManagerCustomerSDK'
// hidden --feature flag to add AssetComputeSDK if true
if (flags['asset-compute']) {
services += ',AssetComputeSDK'
}
let services = 'AdobeTargetSDK,AdobeAnalyticsSDK,CampaignSDK,McDataServicesSdk,AudienceManagerCustomerSDK,AssetComputeSDK'

// client id of the console's workspace jwt credentials
let serviceClientId = ''

Expand Down Expand Up @@ -131,11 +128,6 @@ InitCommand.flags = {
description: 'Login using your Adobe ID for interacting with Adobe I/O Developer Console',
default: true,
allowNo: true
}),
'asset-compute': flags.boolean({
description: 'Feature flag to allow AssetComputeSDK apps to be generated without login',
hidden: true,
default: false
})
}

Expand Down
21 changes: 2 additions & 19 deletions test/commands/app/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ const fullServicesJson = [
{ code: 'AdobeAnalyticsSDK' },
{ code: 'CampaignSDK' },
{ code: 'McDataServicesSdk' },
{ code: 'AudienceManagerCustomerSDK' }
{ code: 'AudienceManagerCustomerSDK' },
{ code: 'AssetComputeSDK' }
]

const fakeCredentials = [
Expand Down Expand Up @@ -232,24 +233,6 @@ describe('run', () => {
expect(spyChdir).not.toHaveBeenCalled()
})

test('no-path, --no-login --asset-compute', async () => {
const project = mockValidConfig()
await TheCommand.run(['--no-login', '--asset-compute'])

// gen-console is skipped
expect(yeoman.createEnv).toHaveBeenCalled()
expect(mockRegister).toHaveBeenCalledTimes(1)
const genApp = mockRegister.mock.calls[0][1]
expect(mockRun).toHaveBeenNthCalledWith(1, genApp, {
'skip-prompt': false,
'skip-install': false,
'project-name': project.name,
'adobe-services': getFullServicesList() + ',AssetComputeSDK'
})
expect(fs.ensureDirSync).not.toHaveBeenCalled()
expect(spyChdir).not.toHaveBeenCalled()
})

test('no-path, --yes --skip-install', async () => {
const project = mockValidConfig()
await TheCommand.run(['--yes', '--skip-install'])
Expand Down