Skip to content

Commit

Permalink
fix additional 2 tests in FileUpdateSuite (#10032)
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Povolotsky <[email protected]>
Co-authored-by: Kim Rader <[email protected]>
  • Loading branch information
povolev15 and kimbor authored Nov 27, 2023
1 parent 1a32b7f commit 3fb8320
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public void start() {
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=" + (nodeId == 0 ? "n" : "n")
+ ",address=*:" + (5005 + nodeId),
"-Dhedera.recordStream.logDir=data/recordStreams",
"-Dhedera.profiles.active=DEV",
"-classpath",
classPath,
"-Dfile.encoding=UTF-8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.MESSAGE_SIZE_TOO_LARGE;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.NOT_SUPPORTED;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ID_REPEATED_IN_TOKEN_LIST;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNAUTHORIZED;
import static com.hederahashgraph.api.proto.java.TokenFreezeStatus.FreezeNotApplicable;
import static com.hederahashgraph.api.proto.java.TokenFreezeStatus.Frozen;
import static com.hederahashgraph.api.proto.java.TokenFreezeStatus.Unfrozen;
Expand All @@ -99,7 +101,6 @@
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -249,7 +250,7 @@ private HapiSpec optimisticSpecialFileUpdate() {
.then(getFileContents(specialFile).hasContents(ignore -> specialFileContents.toByteArray()));
}

// It is not implemented yet in SystemFileUpdateFacility line number 127
@HapiTest
private HapiSpec apiPermissionsChangeDynamically() {
final var civilian = CIVILIAN;
return defaultHapiSpec("ApiPermissionsChangeDynamically")
Expand All @@ -261,10 +262,13 @@ private HapiSpec apiPermissionsChangeDynamically() {
.when(
fileUpdate(API_PERMISSIONS)
.payingWith(ADDRESS_BOOK_CONTROL)
.erasingProps(Set.of("tokenCreate")),
.overridingProps(Map.of("tokenCreate", "0-1")),
getFileContents(API_PERMISSIONS).logged())
.then(
tokenCreate("poc").payingWith(civilian).hasPrecheck(NOT_SUPPORTED),
tokenCreate("poc")
.payingWith(civilian)
.hasPrecheckFrom(NOT_SUPPORTED, OK)
.hasKnownStatus(UNAUTHORIZED),
fileUpdate(API_PERMISSIONS)
.payingWith(ADDRESS_BOOK_CONTROL)
.overridingProps(Map.of("tokenCreate", "0-*")),
Expand Down Expand Up @@ -450,6 +454,7 @@ private HapiSpec kvLimitsEnforced() {
}

@SuppressWarnings("java:S5960")
@HapiTest
private HapiSpec serviceFeeRefundedIfConsGasExhausted() {
final var contract = "User";
final var gasToOffer = Long.parseLong(DEFAULT_MAX_CONS_GAS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ private HapiSpec infoIncludesTxnIdFromCreationReceipt() {
.logged());
}

// @todo('9869')
@HapiTest
private HapiSpec preservesRevocationServiceSemanticsForFileDelete() {
KeyShape waclShape = listOf(SIMPLE, threshOf(2, 3));
SigControl adequateSigs = waclShape.signedWith(sigs(OFF, sigs(ON, ON, OFF)));
Expand Down

0 comments on commit 3fb8320

Please sign in to comment.