Skip to content

Commit

Permalink
Merge pull request #11882 from transcom/addLoadTestFF
Browse files Browse the repository at this point in the history
Add load test ff
  • Loading branch information
deandreJones authored Jan 29, 2024
2 parents 7ed0e5f + 85a5690 commit 965ccb1
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 109 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analyze-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
steps:
- name: Cache PR bundle stats
id: cache-bundle-stats
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build/bundle-stats-${{ github.event.pull_request.head.sha }}.json
key: bundle-stats-${{ github.event.pull_request.head.sha }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
steps:
- name: Cache base bundle stats
id: cache-bundle-stats
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build/bundle-stats-${{ github.event.pull_request.base.sha }}.json
key: bundle-stats-${{ github.event.pull_request.base.sha }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
-- Local test migration.
-- This will be run on development environments.
-- It should mirror what you intend to apply on prd/stg/exp/demo
-- DO NOT include any sensitive data.

-- This migration allows a CAC cert to have read/write access to all orders and the prime API.
-- The Orders API and the Prime API use client certificate authentication. Only certificates
-- signed by a trusted CA (such as DISA) are allowed which includes CACs.
-- Using a person's CAC as the certificate is a convenient way to permit a
-- single trusted individual to interact with the Orders API and the Prime API. Eventually
-- this CAC certificate should be removed.
INSERT INTO users (
id,
okta_email,
created_at,
updated_at)
VALUES (
'87fc5974-fbc9-4719-a3e2-b609647478d7',
'25b64f60444878e22c3cbfbbfdeb6e3e38832ade1c9704a7bd906b709c15bf38' || '@api.move.mil',
now(),
now());

INSERT INTO users_roles (
id,
role_id,
user_id,
created_at,
updated_at)
VALUES (
uuid_generate_v4(),
(SELECT id FROM roles WHERE role_type = 'prime'),
'87fc5974-fbc9-4719-a3e2-b609647478d7',
now(),
now());

INSERT INTO public.client_certs (
id,
sha256_digest,
subject,
user_id,
allow_orders_api,
allow_prime,
created_at,
updated_at,
allow_air_force_orders_read,
allow_air_force_orders_write,
allow_army_orders_read,
allow_army_orders_write,
allow_coast_guard_orders_read,
allow_coast_guard_orders_write,
allow_marine_corps_orders_read,
allow_marine_corps_orders_write,
allow_navy_orders_read,
allow_navy_orders_write)
VALUES (
'3a80db0d-a204-49f9-a9b2-359f57378e01',
'25b64f60444878e22c3cbfbbfdeb6e3e38832ade1c9704a7bd906b709c15bf38',
'C=US, O=U.S. Government, OU=ECA, OU=IdenTrust, OU=MOVEHQ INC., CN=mmb.gov.uat.homesafeconnect.com',
'87fc5974-fbc9-4719-a3e2-b609647478d7',
true,
true,
now(),
now(),
true,
true,
true,
true,
true,
true,
true,
true,
true,
true);
8 changes: 8 additions & 0 deletions src/utils/featureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ const environmentFlags = {
production: {
...defaultFlags,
},

loadtest: {
...defaultFlags,
},
};

const validateFlag = (name) => {
Expand Down Expand Up @@ -102,6 +106,10 @@ export function detectEnvironment(nodeEnv, host) {
case 'office.demo.dp3.us':
case 'admin.demo.dp3.us':
return 'demo';
case 'my.loadtest.dp3.us':
case 'office.loadtest.dp3.us':
case 'admin.loadtest.dp3.us':
return 'loadtest';
default:
return 'development';
}
Expand Down
Loading

0 comments on commit 965ccb1

Please sign in to comment.