155 Commits

Author SHA1 Message Date
Eric
99d161ba1b
fix hardhat running on windows
Solution was two-fold:
1. Run the hardhat.cmd script instead of hardhat
2. Use the absolute path to the script executable instead of relative to the working directory
2025-11-04 20:10:33 +11:00
Eric
98df5bf2ec
Bubble errors from hardhat start
- bubble errors from hardhatprocess.start (instead of just logging)
- push raises: [] in all nodeprocess procs/methods to avoid leaking `Exception` exception types in method overrides
2025-11-04 20:09:34 +11:00
Eric
d3b5d3b1e6
nil check hardhat process before stopping 2025-11-04 20:08:18 +11:00
Eric
b73c91b129
fix exit status 2025-11-04 20:08:18 +11:00
Eric
91f3f85ccd
indicate with exit code 1 if the tests failed 2025-11-04 20:07:48 +11:00
Eric
477c1409d1
fix: pass show continuous updates into test manager instance 2025-11-04 20:07:48 +11:00
Eric
d60c6f7ff1
undo changes done for CI debugging 2025-11-04 20:06:47 +11:00
Eric
84d3d5ad9a
Back off port inc in the hopes that this is causing issues with CI 2025-11-04 20:06:27 +11:00
Eric
fb48ef889b
formatting
trying to make nph happy
2025-11-04 20:02:28 +11:00
Eric
86cce5b3a4
formatting 2025-11-04 20:02:28 +11:00
Eric
30d30080a8
clean up 2025-11-04 20:02:28 +11:00
Eric
ace3644f2d
use tracked futures for showContinuousStatusUpdates 2025-11-04 20:02:28 +11:00
Eric
0e9b42fa39
formatting 2025-11-04 20:02:28 +11:00
Eric
6ccd84b94f
fix rebase, formatting 2025-11-04 20:02:27 +11:00
Eric
f9c52ccc63
fix rebase 2025-11-04 20:02:27 +11:00
Eric
8f43789269
Use absolute path for binary when checking for existence 2025-11-04 20:02:26 +11:00
Eric
53614572e6
fail early with message when hardhat binary not found
# Conflicts:
#	tests/integration/hardhatprocess.nim
2025-11-04 20:02:26 +11:00
Eric
cb0b3023c8
remove unneeded sleep 2025-11-04 20:02:26 +11:00
Eric
b4e3e2cfc1
make onoutputline callback gcsafe 2025-11-04 20:02:26 +11:00
Eric
63e4236ee0
increase port distance per test run 2025-11-04 20:02:26 +11:00
Eric
37d5443be6
add constructor param for continuous status update in terminal
# Conflicts:
#	tests/testIntegration.nim
2025-11-04 20:02:26 +11:00
Eric
7d3a34db2e
fix nodeprocess not exiting 2025-11-04 20:02:26 +11:00
Eric
431cd524c2
ensure timeouts work
Work around the AsyncProcess timeout not working correctly
2025-11-04 20:02:25 +11:00
Eric
69ad29a9b8
continually show test status updates
allows user to know which tests are still running
2025-11-04 20:02:25 +11:00
Eric
aeb651fcb7
cleanup
# Conflicts:
#	tests/testIntegration.nim
2025-11-04 20:02:25 +11:00
Eric
4b3dc2bf83
lock hardhat start to avoid intermittent start failures 2025-11-04 20:02:25 +11:00
Eric
92ee0cb81c
clean up 2025-11-04 20:02:25 +11:00
Eric
110764f7f4
print hardhat testmanager errors and hardhat stdout when there is an error starting hardhat 2025-11-04 20:02:25 +11:00
Eric
3ede65f661
hang manager off IntegrationTest, cleanup
- add a TestManager property to IntegrationTest, so manager does not need to be passed into all functions
- cleanup:
  - remove unneeded stopHardhat function
  - add hardhat instance to manager outside of startHardhat
2025-11-04 20:02:24 +11:00
Eric
8904044fc2
reinstate removed types 2025-11-04 20:02:24 +11:00
Eric
f493b4c197
Add additional logging info print outs
# Conflicts:
#	tests/integration/testcli.nim
2025-11-04 20:02:24 +11:00
Eric
8f8d00bd04
expect process exit code
prevents showing error in the logs when an expected process exit code is encountered

# Conflicts:
#	tests/integration/testcli.nim
2025-11-04 20:02:24 +11:00
Eric
6c577f3461
stop hardhat and show logs
# Conflicts:
#	tests/integration/hardhatprocess.nim
2025-11-04 20:02:24 +11:00
Eric
a2e74dc4a1
default test name to the filename of the integration test
# Conflicts:
#	tests/testIntegration.nim
2025-11-04 20:02:23 +11:00
Eric
887d6e9962
print start/finish stderr/stdout markers
# Conflicts:
#	tests/testIntegration.nim
2025-11-04 20:02:23 +11:00
Eric
525aa59fe1
clean up 2025-11-04 20:02:23 +11:00
Eric
321921894d
stdout formatting for test results
# Conflicts:
#	tests/testIntegration.nim
2025-11-04 20:02:23 +11:00
Eric
eb06b6c0c6
prevent errors during node shutdown 2025-11-04 20:02:23 +11:00
Eric
34d4f781c3
test summary formatting 2025-11-04 20:02:23 +11:00
Eric
9ef61aedc4
parallel tests running
- need to test with longer tests to ensure the parallelisation is truly happening
- is the +10 hardhat port needed?
- try with more integration tests

# Conflicts:
#	tests/integration/hardhatprocess.nim
#	tests/integration/multinodes.nim
#	tests/integration/testcli.nim
#	tests/testIntegration.nim
2025-11-04 20:02:22 +11:00
Arnaud
db8f866db4
feat: check if CID exists in local store (#1331) 2025-11-02 04:32:47 +00:00
Eric
072bff5cab
fix: ci integration tests (#1335) 2025-10-30 19:38:11 +11:00
markspanbroek
01615354af
refactor(ci): run integration tests in parallel by spinning up more runners (#1287) 2025-06-25 08:56:16 +00:00
Arnaud
7b660e3554
chore(marketplace): use hardhat ignition (#1195) 2025-06-20 15:55:00 +00:00
Arnaud
d443df441d
chore: improve marketplace integration tests (#1268) 2025-06-19 06:36:10 +00:00
Chrysostomos Nanakos
b305e00160
Add support for slot reconstruction on unavailable slot detection (#1235)
Co-authored-by: Arnaud <arnaud@status.im>
2025-06-12 22:19:42 +00:00
Arnaud
ca869f6dce
fix(availabilities): use totalRemainingCollateral instead of totalCollateral for comparaison (#1229)
* Use totalRemainingCollateral instead of totalCollateral to compare the availability changes

* Update test to use totalRemainingCollateral instead of totalCollateral when testing OnAvailabilitySaved

* Reduce poll interval

* Fix flaky test

* Fix format
2025-06-02 16:47:12 +00:00
Arnaud
28a83db69e
chore: returns the collateral when a slot is reserved but not filled (#1216)
* Change token allowance method because increaseAllowance does not exist anymore

* Returns collateral when a reservation is deleted and not only a slot is filled

* Remove the returnedCollateral when the slot is not filled by the host

* Add returnedCollateral when the sale is ignored

* Add returnsCollateral variable for ignored state

* Rebase the contracts submodule on the master

* Add integration test

* Fix duration

* Remove unnecessary teardown function

* Remove misleading comment

* Get returned collateral from the request

* Enable logs to debug on CI

* Fix test

* Increase test timeout

* Fix typo

* Fix rebase
2025-05-29 14:47:37 +00:00
Arnaud
c689542579
fix: sales cleanup cancellation (#1234)
* fix(sales): handle cancellation of slot cleanup

Ensures that processing slots from the slot queue
continues even when cleanup of a slot is cancelled.

Co-Authored-By: Eric <5089238+emizzle@users.noreply.github.com>

* chore(reservations): add more `raises` annotations

* Fix cleanup cancellation

* Add remove-agent to trackedfutures instead of the cleanup function

* Increase the timeout to match the request expiry

* Enable logs to debug on CI

* Remove useless except and do not return when add item back to slot queue fails

* Reduce poll interval to detect sale cancelled state

* Avoid cancelling cleanup routine

* Do not cancel creating reservation in order to avoid inconsistent state

* Remove useless try except

---------

Co-authored-by: Mark Spanbroek <mark@spanbroek.net>
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
2025-05-29 06:57:05 +00:00
markspanbroek
25a8077e80
fix(integration): fix api validation test (#1201)
* integration: shutdown codex node at end of test

On Windows the codex node did not shut down properly after this test
finished.

* contracts: fix flaky test
2025-05-26 16:49:53 +00:00