PostNewCoopAssetTransaction

3

tests

0

failures

0

ignored

4.390s

duration

100%

successful

Tests

Test Duration Result
globalAdmin_canAddCoopAssetsReversalTransaction() 1.521s passed
globalAdmin_canNotCancelMoreAssetsThanCurrentlySubscribed() 1.328s passed
globalAdmin_canPostNewCoopAssetTransaction() 1.541s 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:43997/api/hs/office/coopassetstransactions/8e39de06-fa95-4082-b39e-03feffca1651
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:38:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "8e39de06-fa95-4082-b39e-03feffca1651",
    "membership.uuid": "77063bdf-3f8a-4a48-9e39-5975fd574d6a",
    "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:38:48.138Z  WARN 371 --- [-auto-1-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:38:48.139Z ERROR 371 --- [-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 16:38:48 GMT
Connection: close

{
    "timestamp": "2026-08-10 04:38:48",
    "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, 7cd79934-18b1-4339-8dde-666740d9c26b)
HTTP/1.1 201 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:43997/api/hs/office/coopassetstransactions/6f9d1e3d-60f2-4737-b0ee-e5a50e61f124
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:38:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "6f9d1e3d-60f2-4737-b0ee-e5a50e61f124",
    "membership.uuid": "77063bdf-3f8a-4a48-9e39-5975fd574d6a",
    "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": "7cd79934-18b1-4339-8dde-666740d9c26b",
        "membership.uuid": "77063bdf-3f8a-4a48-9e39-5975fd574d6a",
        "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": "6f9d1e3d-60f2-4737-b0ee-e5a50e61f124"
    },
    "reversalAssetTx": null
}
toCleanup(HsOfficeCoopAssetsTransactionEntity, 6f9d1e3d-60f2-4737-b0ee-e5a50e61f124)
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
DELETING temporary HsOfficeCoopAssetsTransactionEntity#6f9d1e3d-60f2-4737-b0ee-e5a50e61f124 deleted 1 rows
DELETING temporary HsOfficeCoopAssetsTransactionEntity#7cd79934-18b1-4339-8dde-666740d9c26b deleted 1 rows
globalAdmin_canAddCoopAssetsReversalTransaction(): TOTAL OBJECT COUNT (after): 210 -> 210