Skip to content

Commit b1c8925

Browse files
authored
<fix>(CI): fix CI check auth mode. (#775)
1 parent a0e3ae6 commit b1c8925

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/integration-test/java/org/fisco/bcos/sdk/v3/test/precompiled/PrecompiledTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
import org.junit.Test;
6161
import org.junit.runners.MethodSorters;
6262

63+
import static org.fisco.bcos.sdk.v3.contract.precompiled.sysconfig.SystemConfigService.AUTH_STATUS;
64+
6365
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
6466
public class PrecompiledTest {
6567
private static final String configFile =
@@ -158,7 +160,14 @@ public void test3SystemConfigService() throws ConfigException, ContractException
158160

159161
CryptoKeyPair cryptoKeyPair = client.getCryptoSuite().getCryptoKeyPair();
160162
SystemConfigService systemConfigService = new SystemConfigService(client, cryptoKeyPair);
161-
if (client.isAuthCheck()) {
163+
boolean authCheck = client.isAuthCheck();
164+
if (client.getChainVersion().compareToVersion(EnumNodeVersion.BCOS_3_3_0) >= 0) {
165+
String value = client.getSystemConfigByKey(AUTH_STATUS).getSystemConfig().getValue();
166+
if (Objects.equals(value, "0")) {
167+
authCheck = false;
168+
}
169+
}
170+
if (authCheck) {
162171
RetCode retCode = systemConfigService.setValueByKey("tx_count_limit", "100");
163172
Assert.assertEquals(retCode.code, PrecompiledRetCode.CODE_NO_AUTHORIZED.code);
164173
return;

0 commit comments

Comments
 (0)