Skip to content

Commit 5ca9de7

Browse files
committed
Ensure integration tests test the platform-specific bundle
1 parent 3850859 commit 5ca9de7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

pack.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ const packageApp = async () => {
7070
await fs.remove(path.join(OUTPUT_DIR, 'nss', 'darwin'));
7171
await fs.copy(path.join(__dirname, 'nss', 'win32'), path.join(OUTPUT_DIR, 'nss', 'win32'));
7272
await spawn(buildScript, ['win32'], { cwd: OUTPUT_DIR, stdio: 'inherit' });
73+
74+
// Oclif builds a nodeless platform-agnostic bundle too (although in our case, nothing is
75+
// really platform agnostic). Not necessary, probably won't work - drop it.
76+
await fs.remove(path.join(
77+
OUTPUT_DIR,
78+
'dist',
79+
`v${pjson.version}`,
80+
`httptoolkit-server-v${pjson.version}.tar.gz`
81+
));
7382
}
7483

7584
packageApp().catch((error: any) => {

test/integration-test.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function setupServerPath() {
1818
return path.join(__dirname, '..', 'bin', 'run');
1919
}
2020

21-
// If TEST_BUILT_TARBALL is set, test the latest build ready-to-go tarball:
21+
// If TEST_BUILT_TARBALL is set, test the latest built ready-to-go tarball:
2222
const tmpDir = tmp.dirSync({ unsafeCleanup: true }).name;
2323
const version = require(path.join('..', 'package.json')).version;
2424
const tarballPath = path.join(
@@ -27,7 +27,7 @@ async function setupServerPath() {
2727
'build',
2828
'dist',
2929
`v${version}`,
30-
`httptoolkit-server-v${version}.tar.gz`
30+
`httptoolkit-server-v${version}-${process.platform}-${process.arch}.tar.gz`
3131
);
3232

3333
console.log('Extracting built tarball to', tmpDir);

0 commit comments

Comments
 (0)