Skip to content

Commit

Permalink
Merge pull request #4610 from snyk/chore/delete-integrated-iac-check-…
Browse files Browse the repository at this point in the history
…for-fedramp-env

chore: remove integrated IaC FF check in FedRAMP env [CFG-2413]
  • Loading branch information
YairZ101 authored May 23, 2023
2 parents eb21374 + 08e1b6f commit 13fcece
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
7 changes: 0 additions & 7 deletions src/lib/feature-flags/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ export async function hasFeatureFlag(
featureFlag: string,
options: Options,
): Promise<boolean | undefined> {
if (
featureFlag === 'iacIntegratedExperience' &&
config.API.includes('snykgov')
) {
return true;
}

const { code, error, ok } = await isFeatureFlagSupportedForOrg(
featureFlag,
options.org,
Expand Down
15 changes: 0 additions & 15 deletions test/jest/unit/lib/feature-flags/feature-flags.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import config from '../../../../../src/lib/config';
import { hasFeatureFlag } from '../../../../../src/lib/feature-flags';
import * as request from '../../../../../src/lib/request';

describe('hasFeatureFlag fn', () => {
const configApiDefault = config.API;

afterAll(() => {
config.API = configApiDefault;
});

it.each`
hasFlag | expected
${true} | ${true}
Expand Down Expand Up @@ -41,12 +34,4 @@ describe('hasFeatureFlag fn', () => {
hasFeatureFlag('test-ff', { path: 'test-path' }),
).rejects.toThrowError('Forbidden');
});

it('should return iacIntegratedExperience feature flag being true for FedRAMP', async () => {
config.API = 'https://app.snykgov.io/api/v1';
const result = await hasFeatureFlag('iacIntegratedExperience', {
path: 'test-path',
});
expect(result).toEqual(true);
});
});

0 comments on commit 13fcece

Please sign in to comment.