Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: accidentally included old code
Browse files Browse the repository at this point in the history
  • Loading branch information
blakebyrnes committed Sep 13, 2024
1 parent 117119a commit a2ba16d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions agent/testing/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ export interface ITestHttpServer<T> {
server: T;
}

const sourcedir = getSourcedir(__dirname);

export async function runKoaServer(onlyCloseOnFinal = true): Promise<ITestKoaServer> {
const koa = new Koa();
const router = new KoaRouter() as ITestKoaServer;
const exampleOrgPath = Path.join(sourcedir, 'html', 'example.org.html');
const exampleOrgPath = Path.join(__dirname, 'html', 'example.org.html');
const exampleOrgHtml = Fs.readFileSync(exampleOrgPath, 'utf-8');
const upload = KoaMulter(); // note you can pass `multer` options here

Expand Down Expand Up @@ -99,8 +97,8 @@ export async function runKoaServer(onlyCloseOnFinal = true): Promise<ITestKoaSer

export function sslCerts() {
return {
key: Fs.readFileSync(`${sourcedir}/certs/key.pem`),
cert: Fs.readFileSync(`${sourcedir}/certs/cert.pem`),
key: Fs.readFileSync(`${__dirname}/certs/key.pem`),
cert: Fs.readFileSync(`${__dirname}/certs/cert.pem`),
};
}

Expand Down Expand Up @@ -420,7 +418,7 @@ export function getTlsConnection(
}

export function getLogo(): Buffer {
return Fs.readFileSync(`${sourcedir}/html/img.png`);
return Fs.readFileSync(`${__dirname}/html/img.png`);
}

export async function readableToBuffer(res: stream.Readable): Promise<Buffer> {
Expand Down

0 comments on commit a2ba16d

Please sign in to comment.