Skip to content

Commit

Permalink
fix(datastore): tests broken from argon updates
Browse files Browse the repository at this point in the history
  • Loading branch information
blakebyrnes committed Oct 9, 2024
1 parent 4741798 commit 8c93bf2
Show file tree
Hide file tree
Showing 16 changed files with 106 additions and 827 deletions.
2 changes: 1 addition & 1 deletion client/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"@ulixee/commons": "2.0.0-alpha.29",
"@ulixee/datastore": "2.0.0-alpha.29",
"@argonprotocol/localchain": "0.0.12",
"@argonprotocol/localchain": "0.0.13",
"@ulixee/net": "2.0.0-alpha.29",
"@ulixee/schema": "2.0.0-alpha.29"
},
Expand Down
1 change: 1 addition & 0 deletions cloud/main/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ULX_DISABLE_DESKTOP_APIS=true
4 changes: 2 additions & 2 deletions datastore/broker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@ulixee/cloud": "2.0.0-alpha.29",
"@ulixee/commons": "2.0.0-alpha.29",
"@ulixee/datastore": "2.0.0-alpha.29",
"@argonprotocol/localchain": "0.0.12",
"@argonprotocol/mainchain": "0.0.12",
"@argonprotocol/localchain": "0.0.13",
"@argonprotocol/mainchain": "0.0.13",
"@ulixee/net": "2.0.0-alpha.29",
"@ulixee/platform-specification": "2.0.0-alpha.29",
"@ulixee/platform-utils": "2.0.0-alpha.29",
Expand Down
4 changes: 2 additions & 2 deletions datastore/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@ulixee/commons": "2.0.0-alpha.29",
"@ulixee/datastore": "2.0.0-alpha.29",
"@ulixee/datastore-docpage": "2.0.0-alpha.29",
"@argonprotocol/localchain": "0.0.12",
"@argonprotocol/localchain": "0.0.13",
"@ulixee/net": "2.0.0-alpha.29",
"@ulixee/platform-specification": "2.0.0-alpha.29",
"@ulixee/platform-utils": "2.0.0-alpha.29",
Expand All @@ -21,7 +21,7 @@
},
"devDependencies": {
"@jest/globals": "^27.0.6",
"@argonprotocol/mainchain": "0.0.12",
"@argonprotocol/mainchain": "0.0.13",
"@ulixee/cloud": "2.0.0-alpha.29",
"@ulixee/datastore-packager": "2.0.0-alpha.29",
"@ulixee/datastore-plugins-hero-core": "2.0.0-alpha.29",
Expand Down
4 changes: 2 additions & 2 deletions datastore/main/.env.defaults
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARGON_MAINCHAIN_URL=wss://rpc.testnet.argonprotocol.org
ARGON_GENESIS_UTC_TIME=1,728,396,000,000
ARGON_MAINCHAIN_URL=
ARGON_GENESIS_UTC_TIME=
ARGON_TICK_DURATION_MILLIS=60000
ARGON_NTP_SERVER=#pool.ntp.org
ARGON_CHANNEL_HOLD_EXPIRATION_TICKS=60
2 changes: 2 additions & 0 deletions datastore/main/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARGON_MAINCHAIN_URL=wss://rpc.testnet.argonprotocol.org
ARGON_GENESIS_UTC_TIME=1,728,396,000,000
1 change: 1 addition & 0 deletions datastore/main/.env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ARGON_TICK_DURATION_MILLIS=2000
ARGON_CHANNEL_HOLD_EXPIRATION_TICKS=2
ARGON_GENESIS_UTC_TIME=1,728,396,000,000
4 changes: 2 additions & 2 deletions datastore/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
}
},
"dependencies": {
"@argonprotocol/mainchain": "0.0.12",
"@argonprotocol/localchain": "0.0.12",
"@argonprotocol/mainchain": "0.0.13",
"@argonprotocol/localchain": "0.0.13",
"@ulixee/commons": "2.0.0-alpha.29",
"@ulixee/net": "2.0.0-alpha.29",
"@ulixee/platform-specification": "2.0.0-alpha.29",
Expand Down
2 changes: 1 addition & 1 deletion datastore/plugins/puppeteer-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@ulixee/commons": "2.0.0-alpha.29",
"@ulixee/datastore": "2.0.0-alpha.29",
"@ulixee/schema": "2.0.0-alpha.29",
"puppeteer": "^23.4.0"
"puppeteer": "^23.5.1"
},
"devDependencies": {
"@ulixee/datastore-testing": "2.0.0-alpha.29"
Expand Down
2 changes: 1 addition & 1 deletion desktop/interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"nanoid": "^3.3.6"
},
"devDependencies": {
"@argonprotocol/localchain": "0.0.12"
"@argonprotocol/localchain": "0.0.13"
}
}
4 changes: 2 additions & 2 deletions end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@ulixee/datastore": "2.0.0-alpha.29",
"@ulixee/datastore-packager": "2.0.0-alpha.29",
"@ulixee/datastore-testing": "2.0.0-alpha.29",
"@argonprotocol/localchain": "0.0.12",
"@argonprotocol/mainchain": "0.0.12",
"@argonprotocol/localchain": "0.0.13",
"@argonprotocol/mainchain": "0.0.13",
"@ulixee/net": "2.0.0-alpha.29",
"@ulixee/platform-specification": "2.0.0-alpha.29",
"@ulixee/platform-utils": "2.0.0-alpha.29",
Expand Down
9 changes: 8 additions & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const fs = require('fs');
const { Localchain } = require('@argonprotocol/localchain');

Check failure on line 2 in jest.setup.js

View workflow job for this annotation

GitHub Actions / Test Node.js 18 on ubuntu-latest

'@argonprotocol/localchain' should be listed in the project's dependencies. Run 'npm i -S @argonprotocol/localchain' to add it

const rmSync = 'rmSync' in fs ? 'rmSync' : 'rmdirSync';

// eslint-disable-next-line import/no-extraneous-dependencies
const CertificateManager = require('@ulixee/unblocked-agent-mitm-socket/lib/CertificateGenerator').default;
const CertificateManager =
require('@ulixee/unblocked-agent-mitm-socket/lib/CertificateGenerator').default;

Check failure on line 8 in jest.setup.js

View workflow job for this annotation

GitHub Actions / Test Node.js 18 on ubuntu-latest

'@ulixee/unblocked-agent-mitm-socket' should be listed in the project's dependencies. Run 'npm i -S @ulixee/unblocked-agent-mitm-socket' to add it

module.exports = async () => {
try {
Expand All @@ -15,6 +17,11 @@ module.exports = async () => {
});
await certManager.waitForConnected;
certManager.close();

if (process.env.ULX_DATA_DIR) {
process.env.ARGON_GENESIS_UTC_TIME = Date.now().toString();
Localchain.setDefaultDir(Path.join(process.env.ULX_DATA_DIR, 'argon', 'localchain'));

Check failure on line 23 in jest.setup.js

View workflow job for this annotation

GitHub Actions / Test Node.js 18 on ubuntu-latest

'Path' is not defined
}
} catch (err) {
// ignore
}
Expand Down
9 changes: 0 additions & 9 deletions package.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@
"**/@electron/**",
"**/electron",
"**electron**",
"**/@argonprotocol/mainchain",
"**/desktop/**/@argonprotocol/localchain-*",
"**/electron-*",
"**/electron-log",
"**/electron-builder",
"**/electron-webpack/**",
"**/electron-updater",
"**/nseventmonitor",
"**/global-mouse-events",
"**/electron-clipboard-ex",
"**/@ulixee/repo-tools",
"@ulixee/repo-tools",
Expand All @@ -45,11 +41,6 @@
"**/vite-*",
"**/@vitejs/**",
"**/@vue/**",
"**/@polkadot/api",
"**/@polkadot/wasm-*",
"**/@polkadot/*",
"**/@polkadot/util",
"**/@polkadot/util-crypto",
"**/@vue/**/**",
"**/vue",
"**/vue-loader",
Expand Down
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,11 @@
"**/@electron/**",
"**/electron",
"**electron**",
"**/@argonprotocol/mainchain",
"**/desktop/**/@argonprotocol/localchain-*",
"**/electron-*",
"**/electron-log",
"**/electron-builder",
"**/electron-webpack/**",
"**/electron-updater",
"**/nseventmonitor",
"**/global-mouse-events",
"**/electron-clipboard-ex",
"**/@ulixee/repo-tools",
"@ulixee/repo-tools",
Expand All @@ -123,11 +119,6 @@
"**/vite-*",
"**/@vitejs/**",
"**/@vue/**",
"**/@polkadot/api",
"**/@polkadot/wasm-*",
"**/@polkadot/*",
"**/@polkadot/util",
"**/@polkadot/util-crypto",
"**/@vue/**/**",
"**/vue",
"**/vue-loader",
Expand Down
2 changes: 1 addition & 1 deletion specification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"dependencies": {
"zod": "^3.22.4",
"@argonprotocol/localchain": "0.0.12"
"@argonprotocol/localchain": "0.0.13"
},
"devDependencies": {
"@ulixee/net": "2.0.0-alpha.29"
Expand Down
Loading

0 comments on commit 8c93bf2

Please sign in to comment.