Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('ImportAssetTypes', () => {
const importContext: ImportContext = {
spacesRootPath: '/tmp/import/spaces',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
org_uid: 'org-1',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('ImportAssets', () => {
const importContext: ImportContext = {
spacesRootPath: '/tmp/import/spaces',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
org_uid: 'org-1',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('CSAssetsImportAdapter (base)', () => {
const importContext: ImportContext = {
spacesRootPath: '/tmp/import/spaces',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
org_uid: 'org-1',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('ImportFields', () => {
const importContext: ImportContext = {
spacesRootPath: '/tmp/import/spaces',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
org_uid: 'org-1',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('ImportSpaces', () => {
csAssetsUrl: 'https://am.example.com',
org_uid: 'org-1',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('ImportWorkspace', () => {
const importContext: ImportContext = {
spacesRootPath: '/tmp/import/spaces',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'api-key-1',
apiKey: 'API_KEY',
host: 'https://api.contentstack.io/v3',
org_uid: 'org-1',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('detectAssetManagementExportFromContentDir', () => {
fs.writeFileSync(
path.join(tmpRoot, 'branches.json'),
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
JSON.stringify([{ stackHeaders: { api_key: 'source-stack-key' } }]),
JSON.stringify([{ stackHeaders: { api_key: 'API_KEY' } }]),
);

stub(utilities.configHandler, 'get').withArgs('region').returns({
Expand All @@ -62,6 +62,6 @@ describe('detectAssetManagementExportFromContentDir', () => {
const flags = detectAssetManagementExportFromContentDir(tmpRoot);
expect(flags.assetManagementEnabled).to.equal(true);
expect(flags.assetManagementUrl).to.equal('https://am.example.com');
expect(flags.source_stack).to.equal('source-stack-key');
expect(flags.source_stack).to.equal('API_KEY');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('Bootstrap Integration Tests', () => {
cloneDirectory: '/test/path',
seedParams: {
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
stackAPIKey: 'test-key',
stackAPIKey: 'API_KEY',
managementTokenAlias: 'test-alias',
managementToken: 'test-token',
},
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('Bootstrap Integration Tests', () => {
// Verify that SeedParams interface includes the new properties
const mockSeedParams = {
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
stackAPIKey: 'test-key',
stackAPIKey: 'API_KEY',
org: 'test-org',
stackName: 'test-stack',
yes: 'yes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ describe('BaseBulkCommand', () => {
publishMode: 'bulk',
apiKey: undefined,
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
stackApiKey: 'fallback-key',
stackApiKey: 'API_KEY',
branch: 'main',
bulkOperationFolder: './bulk-operation',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('Bulk Operation Log Handler', () => {
items: [{ uid: 'entry1' }],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
},
];
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('Bulk Operation Log Handler', () => {
status: 'failed',
error: 'Network error',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
},
];
Expand Down Expand Up @@ -354,7 +354,7 @@ describe('Bulk Operation Log Handler', () => {
environments: ['prod'],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
},
];
Expand Down Expand Up @@ -404,7 +404,7 @@ describe('Bulk Operation Log Handler', () => {
status: 'failed',
error: 'Network error',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
},
];
Expand Down Expand Up @@ -447,7 +447,7 @@ describe('Bulk Operation Log Handler', () => {
items: [{ uid: 'entry1', type: 'entry', locale: 'en-us' }],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand All @@ -473,7 +473,7 @@ describe('Bulk Operation Log Handler', () => {
items: [],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand All @@ -499,7 +499,7 @@ describe('Bulk Operation Log Handler', () => {
items: [],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand Down Expand Up @@ -536,7 +536,7 @@ describe('Bulk Operation Log Handler', () => {
status: 'failed',
error: 'API Error',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand Down Expand Up @@ -572,7 +572,7 @@ describe('Bulk Operation Log Handler', () => {
environments: ['prod'],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand All @@ -596,7 +596,7 @@ describe('Bulk Operation Log Handler', () => {
environments: ['prod'],
status: 'success',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand Down Expand Up @@ -633,7 +633,7 @@ describe('Bulk Operation Log Handler', () => {
status: 'failed',
error: 'Publish failed',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand All @@ -656,7 +656,7 @@ describe('Bulk Operation Log Handler', () => {
environments: [],
status: 'failed',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'test-key',
apiKey: 'API_KEY',
branch: 'main',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,14 @@ describe('Config Builder Utilities', () => {

configHandlerGetStub.withArgs('tokens.test-alias').returns({
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack-from-alias',
apiKey: 'API_KEY',
token: 'cs-token-123',
});

const stackConfig = setupStackConfig(flags);

expect(stackConfig.alias).to.equal('test-alias');
expect(stackConfig.apiKey).to.equal('stack-from-alias');
expect(stackConfig.apiKey).to.equal('API_KEY');
expect(configHandlerGetStub.calledWith('tokens.test-alias')).to.be.true;
});

Expand All @@ -542,7 +542,7 @@ describe('Config Builder Utilities', () => {

configHandlerGetStub.withArgs('tokens.test-alias').returns({
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack-mgmt',
apiKey: 'API_KEY',
token: 'cs-mgmt-token',
type: 'management',
});
Expand All @@ -552,7 +552,7 @@ describe('Config Builder Utilities', () => {
token: 'cs-delivery-token',
environment: 'production',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack123',
apiKey: 'API_KEY',
});

const stackConfig = setupStackConfig(flags);
Expand All @@ -574,7 +574,7 @@ describe('Config Builder Utilities', () => {

configHandlerGetStub.withArgs('tokens.test-alias').returns({
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack-mgmt',
apiKey: 'API_KEY',
token: 'cs-mgmt-token',
type: 'management',
});
Expand All @@ -596,7 +596,7 @@ describe('Config Builder Utilities', () => {

configHandlerGetStub.withArgs('tokens.test-alias').returns({
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack-mgmt',
apiKey: 'API_KEY',
token: 'cs-mgmt-token',
type: 'management',
});
Expand All @@ -605,7 +605,7 @@ describe('Config Builder Utilities', () => {
type: 'management',
token: 'cs-mgmt-token',
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack123',
apiKey: 'API_KEY',
});

expect(() => setupStackConfig(flags)).to.throw(/is not a delivery token/);
Expand All @@ -623,7 +623,7 @@ describe('Config Builder Utilities', () => {

configHandlerGetStub.withArgs('tokens.test-alias').returns({
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack-mgmt',
apiKey: 'API_KEY',
token: 'cs-mgmt-token',
type: 'management',
});
Expand All @@ -633,7 +633,7 @@ describe('Config Builder Utilities', () => {
token: 'cs-delivery-token',
environment: 'production', // Different from source-env
// deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret
apiKey: 'stack123',
apiKey: 'API_KEY',
});

const stackConfig = setupStackConfig(flags);
Expand Down
Loading
Loading