Skip to content

Commit

Permalink
Fixed failing tests (#8528)
Browse files Browse the repository at this point in the history
Signed-off-by: Iris Simon <iris.simon@swirldslabs.com>
  • Loading branch information
iwsimon committed Sep 12, 2023
1 parent 570b055 commit 3facd86
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,7 @@ private HapiSpec invalidTokenTypeFails() {
.then();
}

@HapiTest
private HapiSpec emptyAllowancesRejected() {
return defaultHapiSpec("emptyAllowancesRejected")
.given(cryptoCreate(OWNER).balance(ONE_HUNDRED_HBARS).maxAutomaticTokenAssociations(10))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ private HapiSpec cannotDeleteAlreadyDeletedAccount() {
.hasKnownStatus(ACCOUNT_DELETED));
}

@HapiTest
private HapiSpec cannotDeleteAccountWithSameBeneficiary() {
return defaultHapiSpec("CannotDeleteAccountWithSameBeneficiary")
.given(cryptoCreate(ACCOUNT_TO_BE_DELETED))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,7 @@ private HapiSpec transferWithMissingAccountGetsInvalidAccountId() {
.then();
}

@HapiTest
private HapiSpec vanillaTransferSucceeds() {
long initialBalance = HapiSpecSetup.getDefaultInstance().defaultBalance();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ public HapiSpec creationValidatesExpiry() {
.then(tokenCreate(PRIMARY).expiry(1000).hasPrecheck(INVALID_EXPIRATION_TIME));
}

@HapiTest
public HapiSpec creationValidatesFreezeDefaultWithNoFreezeKey() {
return defaultHapiSpec("CreationValidatesFreezeDefaultWithNoFreezeKey")
.given()
Expand All @@ -560,6 +561,7 @@ public HapiSpec creationValidatesMemo() {
.then(tokenCreate(PRIMARY).entityMemo("N\u0000!!!").hasPrecheck(INVALID_ZERO_BYTE_IN_STRING));
}

@HapiTest
public HapiSpec creationValidatesNonFungiblePrechecks() {
return defaultHapiSpec("CreationValidatesNonFungiblePrechecks")
.given()
Expand All @@ -582,6 +584,7 @@ public HapiSpec creationValidatesNonFungiblePrechecks() {
.hasPrecheck(INVALID_TOKEN_DECIMALS));
}

@HapiTest
public HapiSpec creationValidatesMaxSupply() {
return defaultHapiSpec("CreationValidatesMaxSupply")
.given()
Expand Down Expand Up @@ -924,6 +927,7 @@ public HapiSpec creationValidatesTreasuryAccount() {
.hasKnownStatus(INVALID_TREASURY_ACCOUNT_FOR_TOKEN));
}

@HapiTest
public HapiSpec initialSupplyMustBeSane() {
return defaultHapiSpec("InitialSupplyMustBeSane")
.given()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ public HapiSpec tokenOnlyTxnsAreAtomic() {
getAccountBalance(BENEFICIARY).logged());
}

@HapiTest
public HapiSpec duplicateAccountsInTokenTransferRejected() {
return defaultHapiSpec("DuplicateAccountsInTokenTransferRejected")
.given(
Expand All @@ -1013,6 +1014,7 @@ public HapiSpec duplicateAccountsInTokenTransferRejected() {
.hasPrecheck(ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS));
}

@HapiTest
public HapiSpec nonZeroTransfersRejected() {
return defaultHapiSpec("NonZeroTransfersRejected")
.given(cryptoCreate(FIRST_TREASURY).balance(0L))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ public HapiSpec nameChanges() {
.then(getTokenInfo("tbu").hasName(hopefullyUnique));
}

@HapiTest
public HapiSpec tooLongNameCheckHolds() {
var tooLongName = "ORIGINAL" + TxnUtils.randomUppercase(MAX_NAME_LENGTH + 1);

Expand All @@ -385,6 +386,7 @@ public HapiSpec tooLongNameCheckHolds() {
.then(tokenUpdate("tbu").name(tooLongName).hasPrecheck(TOKEN_NAME_TOO_LONG));
}

@HapiTest
public HapiSpec tooLongSymbolCheckHolds() {
var tooLongSymbol = TxnUtils.randomUppercase(MAX_SYMBOL_LENGTH + 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ num.opFinisher.threads=8
persistentEntities.dir.path=
persistentEntities.updateCreatedManifests=true
spec.autoScheduledTxns=
spec.streamlinedIngestChecks=INVALID_PRNG_RANGE,INVALID_STAKING_ID,ALIAS_ALREADY_ASSIGNED,INVALID_ALIAS_KEY,KEY_REQUIRED,BAD_ENCODING,AUTORENEW_DURATION_NOT_IN_RANGE,INVALID_ZERO_BYTE_IN_STRING,INVALID_ADMIN_KEY,ACCOUNT_DELETED,BUSY,INSUFFICIENT_PAYER_BALANCE,INSUFFICIENT_TX_FEE,INVALID_ACCOUNT_ID,INVALID_NODE_ACCOUNT,INVALID_SIGNATURE,INVALID_TRANSACTION,INVALID_TRANSACTION_BODY,INVALID_TRANSACTION_DURATION,INVALID_TRANSACTION_ID,INVALID_TRANSACTION_START,INVALID_ZERO_BYTE_IN_STRING,KEY_PREFIX_MISMATCH,MEMO_TOO_LONG,PAYER_ACCOUNT_NOT_FOUND,PLATFORM_NOT_ACTIVE,TRANSACTION_EXPIRED,TRANSACTION_HAS_UNKNOWN_FIELDS,TRANSACTION_ID_FIELD_NOT_ALLOWED,TRANSACTION_OVERSIZE
spec.streamlinedIngestChecks=INVALID_PRNG_RANGE,INVALID_STAKING_ID,ALIAS_ALREADY_ASSIGNED,INVALID_ALIAS_KEY,KEY_REQUIRED,BAD_ENCODING,AUTORENEW_DURATION_NOT_IN_RANGE,INVALID_ZERO_BYTE_IN_STRING,INVALID_ADMIN_KEY,ACCOUNT_DELETED,BUSY,INSUFFICIENT_PAYER_BALANCE,INSUFFICIENT_TX_FEE,INVALID_ACCOUNT_ID,INVALID_NODE_ACCOUNT,INVALID_SIGNATURE,INVALID_TRANSACTION,INVALID_TRANSACTION_BODY,INVALID_TRANSACTION_DURATION,INVALID_TRANSACTION_ID,INVALID_TRANSACTION_START,INVALID_ZERO_BYTE_IN_STRING,KEY_PREFIX_MISMATCH,MEMO_TOO_LONG,PAYER_ACCOUNT_NOT_FOUND,PLATFORM_NOT_ACTIVE,TRANSACTION_EXPIRED,TRANSACTION_HAS_UNKNOWN_FIELDS,TRANSACTION_ID_FIELD_NOT_ALLOWED,TRANSACTION_OVERSIZE,TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT,EMPTY_ALLOWANCES,REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT,TOKEN_HAS_NO_FREEZE_KEY,TOKEN_HAS_NO_SUPPLY_KEY,INVALID_TOKEN_INITIAL_SUPPLY,INVALID_TOKEN_DECIMALS,INVALID_TOKEN_MAX_SUPPLY,INVALID_TOKEN_INITIAL_SUPPLY,ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS,TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN,INVALID_ACCOUNT_AMOUNTS,TOKEN_NAME_TOO_LONG,TOKEN_SYMBOL_TOO_LONG
status.deferredResolves.doAsync=true
status.preResolve.pause.ms=0
status.wait.sleep.ms=500
Expand Down

0 comments on commit 3facd86

Please sign in to comment.