Skip to content

Commit

Permalink
chore: make dormant for now
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagraber committed Dec 11, 2024
1 parent 6466a36 commit db95dd7
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 212 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/daily_integration.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Daily API Integration Tests
on:
schedule:
# Runs at 00:00 EST (05:00 UTC)
- cron: '0 5 * * *'

# Turning off daily scheduled run for now
# on:
# schedule:
# # Runs at 00:00 EST (05:00 UTC)
# - cron: '0 5 * * *'

on: workflow_dispatch

jobs:
api-tests:
Expand Down
2 changes: 0 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ const config = {
// HOST: process.env.HOST || 'localhost',
};

console.log('config', config);

export default config;
11 changes: 2 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,14 @@ import healthRouter from './routes/health';
const app = express();
const port = config.PORT;

app.set('trust proxy', 1);
app.use(express.urlencoded({ extended: true }));
// app.set('trust proxy', 1);
// app.use(express.urlencoded({ extended: true }));
app.use(rateLimiter);
app.use(cors(corsOptions));
app.use(express.json());
app.use(addRequestId);
app.use(requestLogger);

// Test routes
// @ts-expect-error foo
app.get('/x-forwarded-for', (request, response) =>
response.send(request.headers['x-forwarded-for'])
);
// @ts-expect-error foo
app.get('/ip', (request, response) => response.send(request.ip));
// Routes
app.use('/health', healthRouter);
app.use('/donor-box', donorBoxRouter);
Expand Down
8 changes: 0 additions & 8 deletions src/routes/donor-box/controllers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NextFunction, Request, Response } from 'express';
import config from '../../config';
import axios from 'axios';
import { logger } from '../../middleware/logger';

export async function get(req: Request, res: Response, next: NextFunction) {
try {
Expand All @@ -22,15 +21,8 @@ export async function get(req: Request, res: Response, next: NextFunction) {
},
params: req.query, // Pass through any query parameters
});
logger.info({
response,
env: response.config.env,
header: `Basic ${btoa(`${authKey}:${authValue}`)}`,
});
res.json(response.data);
} catch (error) {
logger.error(error);
console.error(error);
next(error);
}
}
1 change: 1 addition & 0 deletions src/routes/donor-box/test.integration.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import express from 'express';
import serverRoutes from './routes';
import request from 'supertest';
Expand Down
41 changes: 0 additions & 41 deletions src/test/find-available-port.ts

This file was deleted.

29 changes: 0 additions & 29 deletions src/test/setup.ts

This file was deleted.

119 changes: 0 additions & 119 deletions src/test/types.ts

This file was deleted.

0 comments on commit db95dd7

Please sign in to comment.