Search in sources :

Example 1 with INVALID_ZERO_BYTE_IN_STRING

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ZERO_BYTE_IN_STRING in project hedera-services by hashgraph.

the class FileUpdateSuite method vanillaUpdateSucceeds.

private HapiApiSpec vanillaUpdateSucceeds() {
    final byte[] old4K = randomUtf8Bytes(BYTES_4K);
    final byte[] new4k = randomUtf8Bytes(BYTES_4K);
    final String firstMemo = "Originally";
    final String secondMemo = "Subsequently";
    return defaultHapiSpec("VanillaUpdateSucceeds").given(fileCreate("test").entityMemo(firstMemo).contents(old4K)).when(fileUpdate("test").entityMemo(ZERO_BYTE_MEMO).contents(new4k).hasPrecheck(INVALID_ZERO_BYTE_IN_STRING), fileUpdate("test").entityMemo(secondMemo).contents(new4k)).then(getFileContents("test").hasContents(ignore -> new4k), getFileInfo("test").hasMemo(secondMemo));
}
Also used : IMAP_USER_BYTECODE_PATH(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources.IMAP_USER_BYTECODE_PATH) QueryVerbs.getAliasedAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAliasedAccountInfo) MAX_CONTRACT_STORAGE_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_CONTRACT_STORAGE_EXCEEDED) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) HapiCryptoTransfer.tinyBarsFromAccountToAlias(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromAccountToAlias) QueryVerbs.getContractInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) HapiSpecSetup(com.hedera.services.bdd.spec.HapiSpecSetup) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) UtilVerbs.sleepFor(com.hedera.services.bdd.spec.utilops.UtilVerbs.sleepFor) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) ExpectedTokenRel.relationshipWith(com.hedera.services.bdd.spec.queries.crypto.ExpectedTokenRel.relationshipWith) Map(java.util.Map) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) CustomFeeSpecs.fixedHtsFee(com.hedera.services.bdd.spec.transactions.token.CustomFeeSpecs.fixedHtsFee) NOT_SUPPORTED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.NOT_SUPPORTED) QueryVerbs.contractCallLocal(com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal) Frozen(com.hederahashgraph.api.proto.java.TokenFreezeStatus.Frozen) CUSTOM_FEES_LIST_TOO_LONG(com.hederahashgraph.api.proto.java.ResponseCodeEnum.CUSTOM_FEES_LIST_TOO_LONG) TxnVerbs.contractCall(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCall) TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT) ContractFnResultAsserts.resultWith(com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith) Set(java.util.Set) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) UtilVerbs.resetAppPropertiesTo(com.hedera.services.bdd.spec.utilops.UtilVerbs.resetAppPropertiesTo) ByteString(com.google.protobuf.ByteString) List(java.util.List) Logger(org.apache.logging.log4j.Logger) IMAP_USER_INSERT(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources.IMAP_USER_INSERT) AUTORENEW_DURATION_NOT_IN_RANGE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.AUTORENEW_DURATION_NOT_IN_RANGE) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) TxnVerbs.tokenDissociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDissociate) UtilVerbs.usableTxnIdNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.usableTxnIdNamed) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) BYTES_4K(com.hedera.services.bdd.spec.transactions.TxnUtils.BYTES_4K) UtilVerbs.overriding(com.hedera.services.bdd.spec.utilops.UtilVerbs.overriding) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) KycNotApplicable(com.hederahashgraph.api.proto.java.TokenKycStatus.KycNotApplicable) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) Unfrozen(com.hederahashgraph.api.proto.java.TokenFreezeStatus.Unfrozen) Revoked(com.hederahashgraph.api.proto.java.TokenKycStatus.Revoked) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) ContractResources(com.hedera.services.bdd.spec.infrastructure.meta.ContractResources) TxnVerbs(com.hedera.services.bdd.spec.transactions.TxnVerbs) TxnVerbs.uncheckedSubmit(com.hedera.services.bdd.spec.transactions.TxnVerbs.uncheckedSubmit) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) MAX_GAS_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_GAS_LIMIT_EXCEEDED) TokenAssociationSpecs(com.hedera.services.bdd.suites.token.TokenAssociationSpecs) UtilVerbs.overridingTwo(com.hedera.services.bdd.spec.utilops.UtilVerbs.overridingTwo) MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) UtilVerbs.updateSpecialFile(com.hedera.services.bdd.spec.utilops.UtilVerbs.updateSpecialFile) FreezeNotApplicable(com.hederahashgraph.api.proto.java.TokenFreezeStatus.FreezeNotApplicable) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) QueryVerbs.getFileContents(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents) TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED) TOKEN_ID_REPEATED_IN_TOKEN_LIST(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ID_REPEATED_IN_TOKEN_LIST) INVALID_ZERO_BYTE_IN_STRING(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ZERO_BYTE_IN_STRING) INVALID_TOKEN_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_ID) QueryVerbs.getFileInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) TxnUtils.randomUtf8Bytes(com.hedera.services.bdd.spec.transactions.TxnUtils.randomUtf8Bytes) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) CONSENSUS_GAS_EXHAUSTED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.CONSENSUS_GAS_EXHAUSTED) UtilVerbs(com.hedera.services.bdd.spec.utilops.UtilVerbs) CustomFeeSpecs.fixedHbarFee(com.hedera.services.bdd.spec.transactions.token.CustomFeeSpecs.fixedHbarFee) TxnVerbs.contractCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.contractCreate) ContractInfoAsserts.contractWith(com.hedera.services.bdd.spec.assertions.ContractInfoAsserts.contractWith) LogManager(org.apache.logging.log4j.LogManager) ByteString(com.google.protobuf.ByteString)

Aggregations

ByteString (com.google.protobuf.ByteString)1 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)1 HapiApiSpec.defaultHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec)1 HapiSpecSetup (com.hedera.services.bdd.spec.HapiSpecSetup)1 ContractFnResultAsserts.resultWith (com.hedera.services.bdd.spec.assertions.ContractFnResultAsserts.resultWith)1 ContractInfoAsserts.contractWith (com.hedera.services.bdd.spec.assertions.ContractInfoAsserts.contractWith)1 ContractResources (com.hedera.services.bdd.spec.infrastructure.meta.ContractResources)1 IMAP_USER_BYTECODE_PATH (com.hedera.services.bdd.spec.infrastructure.meta.ContractResources.IMAP_USER_BYTECODE_PATH)1 IMAP_USER_INSERT (com.hedera.services.bdd.spec.infrastructure.meta.ContractResources.IMAP_USER_INSERT)1 QueryVerbs.contractCallLocal (com.hedera.services.bdd.spec.queries.QueryVerbs.contractCallLocal)1 QueryVerbs.getAccountInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo)1 QueryVerbs.getAliasedAccountInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getAliasedAccountInfo)1 QueryVerbs.getContractInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getContractInfo)1 QueryVerbs.getFileContents (com.hedera.services.bdd.spec.queries.QueryVerbs.getFileContents)1 QueryVerbs.getFileInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getFileInfo)1 QueryVerbs.getTxnRecord (com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord)1 ExpectedTokenRel.relationshipWith (com.hedera.services.bdd.spec.queries.crypto.ExpectedTokenRel.relationshipWith)1 BYTES_4K (com.hedera.services.bdd.spec.transactions.TxnUtils.BYTES_4K)1 TxnUtils.randomUtf8Bytes (com.hedera.services.bdd.spec.transactions.TxnUtils.randomUtf8Bytes)1 TxnVerbs (com.hedera.services.bdd.spec.transactions.TxnVerbs)1