PostNewCoopAssetTransaction

3

tests

0

failures

0

ignored

4.517s

duration

100%

successful

Tests

Test Duration Result
globalAdmin_canAddCoopAssetsReversalTransaction() 1.496s passed
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed() 1.449s passed
globalAdmin_canPostNewCoopAssetTransaction() 1.572s passed

Standard output

ContextBasedTestWithCleanup.retrieveInitialTestData
globalAdmin_canPostNewCoopAssetTransaction(): TOTAL OBJECT COUNT (initial): 210 -> 210
HTTP/1.1 201 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:42409/api/hs/office/coopassetstransactions/240d81a6-c3b6-4ed3-b9a0-a9707b4ad797
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Aug 2026 16:30:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "240d81a6-c3b6-4ed3-b9a0-a9707b4ad797",
    "membership.uuid": "3995a914-611c-4fba-abeb-9ca14ecd37d3",
    "membership.memberNumber": "M-1000101",
    "transactionType": "DEPOSIT",
    "assetValue": 1024.00,
    "valueDate": "2022-10-13",
    "reference": "temp ref A",
    "comment": "just some test coop assets transaction",
    "adoptionAssetTx": null,
    "transferAssetTx": null,
    "revertedAssetTx": null,
    "reversalAssetTx": null
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
globalAdmin_canPostNewCoopAssetTransaction(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed(): TOTAL OBJECT COUNT (initial): 210 -> 210
2026-08-10T16:30:38.540Z  WARN 374 --- [o-auto-1-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:30:38.540Z ERROR 374 --- [o-auto-1-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [400] office.coop-assets.transaction-would-result-in-a-negative-balance-of-assets
  Where: PL/pgSQL function hs_office.coopassettx_enforce_positive_total() line 12 at RAISE
SQL statement "insert
            into hs_office.coopassettx (uuid, version, membershipuuid, transactiontype, valuedate, assetvalue, reference, revertedassettxuuid, assetadoptiontxuuid, comment)
            values (new.uuid, new.version, new.membershipuuid, new.transactiontype, new.valuedate, new.assetvalue, new.reference, new.revertedassettxuuid, new.assetadoptiontxuuid, new.comment)
            returning *"
PL/pgSQL function hs_office.coopassettx_instead_of_insert_tf() line 5 at SQL statement
HTTP/1.1 400 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Aug 2026 16:30:38 GMT
Connection: close

{
    "timestamp": "2026-08-10 04:30:38",
    "path": "",
    "statusCode": 400,
    "statusPhrase": "Bad Request",
    "message": "ERROR: [400] Geschäftsguthaben-Transaktion würde zu einem negativen Geschäftsguthaben-Saldo führen"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
globalAdmin_canAddCoopAssetsReversalTransaction(): TOTAL OBJECT COUNT (initial): 210 -> 210
toCleanup(HsOfficeCoopAssetsTransactionEntity, bd6f248b-18b1-489e-863a-a8d6eb4f92f4)
HTTP/1.1 201 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:42409/api/hs/office/coopassetstransactions/439827e3-1d32-4960-bdfe-3d880dd6a8a7
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Aug 2026 16:30:40 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "439827e3-1d32-4960-bdfe-3d880dd6a8a7",
    "membership.uuid": "3995a914-611c-4fba-abeb-9ca14ecd37d3",
    "membership.memberNumber": "M-1000101",
    "transactionType": "REVERSAL",
    "assetValue": -256.00,
    "valueDate": "2022-10-30",
    "reference": "test ref reversal",
    "comment": "some coop assets reversal transaction",
    "adoptionAssetTx": null,
    "transferAssetTx": null,
    "revertedAssetTx": {
        "uuid": "bd6f248b-18b1-489e-863a-a8d6eb4f92f4",
        "membership.uuid": "3995a914-611c-4fba-abeb-9ca14ecd37d3",
        "membership.memberNumber": "M-1000101",
        "transactionType": "DEPOSIT",
        "assetValue": 256.00,
        "valueDate": "2022-10-20",
        "reference": "test ref",
        "comment": null,
        "adoptionAssetTx.uuid": null,
        "transferAssetTx.uuid": null,
        "revertedAssetTx.uuid": null,
        "reversalAssetTx.uuid": "439827e3-1d32-4960-bdfe-3d880dd6a8a7"
    },
    "reversalAssetTx": null
}
toCleanup(HsOfficeCoopAssetsTransactionEntity, 439827e3-1d32-4960-bdfe-3d880dd6a8a7)
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
DELETING temporary HsOfficeCoopAssetsTransactionEntity#439827e3-1d32-4960-bdfe-3d880dd6a8a7 deleted 1 rows
DELETING temporary HsOfficeCoopAssetsTransactionEntity#bd6f248b-18b1-489e-863a-a8d6eb4f92f4 deleted 1 rows
globalAdmin_canAddCoopAssetsReversalTransaction(): TOTAL OBJECT COUNT (after): 210 -> 210