PostNewCoopAssetTransaction

3

tests

0

failures

0

ignored

4.294s

duration

100%

successful

Tests

Test Duration Result
globalAdmin_canAddCoopAssetsReversalTransaction() 1.517s passed
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed() 1.330s passed
globalAdmin_canPostNewCoopAssetTransaction() 1.447s 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:43147/api/hs/office/coopassetstransactions/3c21b02e-897f-4f6c-9e40-816145f86f21
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 13:34:18 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "3c21b02e-897f-4f6c-9e40-816145f86f21",
    "membership.uuid": "d56877a7-472c-465c-b39a-0f1b4e9c46d3",
    "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-10T13:34:19.495Z  WARN 368 --- [-auto-1-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T13:34:19.495Z ERROR 368 --- [-auto-1-exec-10] 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 13:34:19 GMT
Connection: close

{
    "timestamp": "2026-08-10 01:34:19",
    "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, 7b63ec5e-46d4-4a36-a794-316ec34b60c8)
HTTP/1.1 201 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:43147/api/hs/office/coopassetstransactions/853a71d4-c80f-40e0-9c53-9f24154cc473
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 13:34:20 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "853a71d4-c80f-40e0-9c53-9f24154cc473",
    "membership.uuid": "d56877a7-472c-465c-b39a-0f1b4e9c46d3",
    "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": "7b63ec5e-46d4-4a36-a794-316ec34b60c8",
        "membership.uuid": "d56877a7-472c-465c-b39a-0f1b4e9c46d3",
        "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": "853a71d4-c80f-40e0-9c53-9f24154cc473"
    },
    "reversalAssetTx": null
}
toCleanup(HsOfficeCoopAssetsTransactionEntity, 853a71d4-c80f-40e0-9c53-9f24154cc473)
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
DELETING temporary HsOfficeCoopAssetsTransactionEntity#853a71d4-c80f-40e0-9c53-9f24154cc473 deleted 1 rows
DELETING temporary HsOfficeCoopAssetsTransactionEntity#7b63ec5e-46d4-4a36-a794-316ec34b60c8 deleted 1 rows
globalAdmin_canAddCoopAssetsReversalTransaction(): TOTAL OBJECT COUNT (after): 210 -> 210