Skip to content

Commit

Permalink
testing phase 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nourkrimesh committed Aug 10, 2023
1 parent 0ed9022 commit f273ba6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 44 deletions.
45 changes: 1 addition & 44 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 25,6 @@ const GOOGLE_CALLBACK_URL = process.env.GOOGLE_CALLBACK_URL || '';

const environment = process.env.NODE_ENV || 'development';

const TEST_CUSTOMER_EMAIL = process.env.TEST_CUSTOMER_EMAIL || '';
const TEST_CUSTOMER_PASSWORD = process.env.TEST_CUSTOMER_PASSWORD || '';
const TEST_CUSTOMER_TOKEN = process.env.TEST_CUSTOMER_TOKEN || '';
const TEST_CUSTOMER_ID = process.env.TEST_CUSTOMER_ID || '';

const TEST_COOK_EMAIL = process.env.TEST_COOK_EMAIL || '';
const TEST_COOK_PASSWORD = process.env.TEST_COOK_PASSWORD || '';
const TEST_COOK_TOKEN = process.env.TEST_COOK_TOKEN || '';
const TEST_COOK_ID = process.env.TEST_COOK_ID || '';

const TEST_ADMIN_EMAIL = process.env.TEST_ADMIN_EMAIL || '';
const TEST_ADMIN_PASSWORD = process.env.TEST_ADMIN_PASSWORD || '';
const TEST_ADMIN_TOKEN = process.env.TEST_ADMIN_TOKEN || '';
const TEST_ADMIN_ID = process.env.TEST_ADMIN_ID || '';

const TEST_DISH_ID = process.env.TEST_DISH_ID || '';
const TEST_CART_ID = process.env.TEST_CART_ID || '';

export const config = {
mongo: {
devDB: {
Expand All @@ -69,30 51,5 @@ export const config = {
clientSecret: GOOGLE_CLIENT_SECRET,
callbackUrl: GOOGLE_CALLBACK_URL,
},
environment,
testCustomer: {
id: TEST_CUSTOMER_ID,
email: TEST_CUSTOMER_EMAIL,
password: TEST_CUSTOMER_PASSWORD,
token: TEST_CUSTOMER_TOKEN
},
testCook: {
id: TEST_COOK_ID,
email: TEST_COOK_EMAIL,
password: TEST_COOK_PASSWORD,
token: TEST_COOK_TOKEN
},
testAdmin: {
id: TEST_ADMIN_ID,
email: TEST_ADMIN_EMAIL,
password: TEST_ADMIN_PASSWORD,
token: TEST_ADMIN_TOKEN
},
testDish: {
id: TEST_DISH_ID
},
testCart: {
id: TEST_CART_ID
}

environment
}
1 change: 1 addition & 0 deletions src/db/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 12,7 @@ if (config.environment === 'development') {
const connectToDatabase = async () => {
if (mongoURI !== undefined) {
try {
console.log('trying to connect to database with connStr:', mongoURI);
await mongoose.connect(mongoURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
Expand Down

0 comments on commit f273ba6

Please sign in to comment.