Skip to content

Commit

Permalink
Merge pull request #119 from companieshouse/feature/idva6-1685-fix-mo…
Browse files Browse the repository at this point in the history
…ngo-script-for-acsp-web

IDVA6-1685 - Review Mongo Test Data Issues
  • Loading branch information
bwallace-ch authored Oct 10, 2024
2 parents 261446c + d0d6c33 commit 3a94d25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/seed-acsp-data-mongo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ const mongodbConfigs = {
const USE_ENV = process.env.USE_ENV || "local";

export const MONGODB_URI = process.env.MONGODB_URI || mongodbConfigs[USE_ENV];
export const DEFAULT_PASSWORD = process.env.DEFAULT_PASSWORD || "password";
export const DEFAULT_PASSWORD = process.env.DEFAULT_PASSWORD || "$2a$10$6a..eerV1kSiNW3sBlcYv.VmEXyI7ABWuoo3w7zKzcdh18YKyvPbm";
export const NO_USERS_TO_CREATE = process.env.NO_USERS_TO_CREATE ? parseInt(process.env.NO_USERS_TO_CREATE, 10) : 100;
4 changes: 1 addition & 3 deletions tools/seed-acsp-data-mongo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ function createUserData (count) {
for (let i = 0; i < count; i += 1) {
const forename = faker.person.firstName();
const surname = faker.person.lastName();
const displayNameOptions = ["Not Provided", `${forename} ${surname}`];
const displayNameOptions = [null, `${forename} ${surname}`];
persons.push({
_id: faker.string.uuid().replace(/-/g, ""),
email: faker.internet.email({ firstName: `inugami_test_data_${forename}`, lastName: surname }).toLowerCase(),
forename,
surname,
password: DEFAULT_PASSWORD,
display_name: displayNameOptions[Math.floor(Math.random() * 2)]
});
Expand Down

0 comments on commit 3a94d25

Please sign in to comment.