PostNewCoopAssetTransaction

3

tests

0

failures

0

ignored

3.869s

duration

100%

successful

Tests

Test Duration Result
globalAdmin_canAddCoopAssetsReversalTransaction() 1.346s passed
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed() 1.244s passed
globalAdmin_canPostNewCoopAssetTransaction() 1.279s 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:39795/api/hs/office/coopassetstransactions/a905b1e9-6557-4056-a366-ffb01580a128
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 15:04:51 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "a905b1e9-6557-4056-a366-ffb01580a128",
    "membership.uuid": "fcd597da-fce6-447a-924e-c96831fe8bfe",
    "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-10T15:04:52.958Z  WARN 373 --- [-auto-1-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T15:04:52.958Z ERROR 373 --- [-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 15:04:52 GMT
Connection: close

{
    "timestamp": "2026-08-10 03:04:52",
    "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, 09404314-e3da-40cb-bba4-6b18df378d1d)
HTTP/1.1 201 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:39795/api/hs/office/coopassetstransactions/8e851151-6c71-4e71-8bbf-1ece8a96f296
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 15:04:54 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "8e851151-6c71-4e71-8bbf-1ece8a96f296",
    "membership.uuid": "fcd597da-fce6-447a-924e-c96831fe8bfe",
    "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": "09404314-e3da-40cb-bba4-6b18df378d1d",
        "membership.uuid": "fcd597da-fce6-447a-924e-c96831fe8bfe",
        "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": "8e851151-6c71-4e71-8bbf-1ece8a96f296"
    },
    "reversalAssetTx": null
}
toCleanup(HsOfficeCoopAssetsTransactionEntity, 8e851151-6c71-4e71-8bbf-1ece8a96f296)
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
DELETING temporary HsOfficeCoopAssetsTransactionEntity#8e851151-6c71-4e71-8bbf-1ece8a96f296 deleted 1 rows
DELETING temporary HsOfficeCoopAssetsTransactionEntity#09404314-e3da-40cb-bba4-6b18df378d1d deleted 1 rows
globalAdmin_canAddCoopAssetsReversalTransaction(): TOTAL OBJECT COUNT (after): 210 -> 210