Skip to content

Commit 60cb167

Browse files
authored
Upgrade test 1.4.1 (#590)
Upgrade test 1.4.1
1 parent 912eb71 commit 60cb167

File tree

4 files changed

+47
-5
lines changed

4 files changed

+47
-5
lines changed

integration_tests/upgrade/03-test-upgrade-1.2-to-1.4.sh

+44-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ source integration_tests/cli/common.sh
1919
# Upgrade constants
2020

2121
plan_name="v1.4"
22-
upgrade_checksum="sha256:1dc4a44041dcaf11545b7543dfe942f4742f568be68fee275441b092bb60deed"
22+
upgrade_checksum="sha256:b0d18713cb1582dbd686290b41657c3f5a9f17f845e85bfa56eb48da34ff8247"
2323
binary_version_old="v1.2.2"
24-
binary_version_new="v1.4.0-dev3"
24+
binary_version_new="v1.4.1-pre2"
2525

2626
wget -O dcld_old "https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/$binary_version_old/dcld"
2727
chmod ugo+x dcld_old
@@ -509,18 +509,30 @@ intermediate_cert_with_vid_subject="MIGuMQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlv
509509
intermediate_cert_with_vid_subject_key_id="0E:8C:E8:C8:B8:AA:50:BC:25:85:56:B9:B1:9C:C2:C7:D9:C5:2F:17"
510510
intermediate_cert_with_vid_path="integration_tests/constants/intermediate_cert_with_vid_1"
511511
intermediate_cert_with_vid_serial_number="3"
512+
intermediate_cert_with_vid_65521_vid=65521
512513

513514
noc_root_cert_1_path="integration_tests/constants/noc_root_cert_1"
514515
noc_root_cert_1_subject="MHoxCzAJBgNVBAYTAlVaMRMwEQYDVQQIDApTb21lIFN0YXRlMREwDwYDVQQHDAhUYXNoa2VudDEYMBYGA1UECgwPRXhhbXBsZSBDb21wYW55MRkwFwYDVQQLDBBUZXN0aW5nIERpdmlzaW9uMQ4wDAYDVQQDDAVOT0MtMQ=="
515516
noc_root_cert_1_subject_key_id="44:EB:4C:62:6B:25:48:CD:A2:B3:1C:87:41:5A:08:E7:2B:B9:83:26"
516517
noc_root_cert_1_serial_number="47211865327720222621302679792296833381734533449"
517518
noc_root_cert_1_subject_as_text="CN=NOC-1,OU=Testing Division,O=Example Company,L=Tashkent,ST=Some State,C=UZ"
518519

520+
noc_root_cert_2_path="integration_tests/constants/noc_root_cert_2"
521+
noc_root_cert_2_subject="MHoxCzAJBgNVBAYTAlVaMRMwEQYDVQQIDApTb21lIFN0YXRlMREwDwYDVQQHDAhUYXNoa2VudDEYMBYGA1UECgwPRXhhbXBsZSBDb21wYW55MRkwFwYDVQQLDBBUZXN0aW5nIERpdmlzaW9uMQ4wDAYDVQQDDAVOT0MtMg=="
522+
noc_root_cert_2_subject_key_id="CF:E6:DD:37:2B:4C:B2:B9:A9:F2:75:30:1C:AA:B1:37:1B:11:7F:1B"
523+
noc_root_cert_2_serial_number="332802481233145945539125204504842614737181725760"
524+
noc_root_cert_2_subject_as_text="CN=NOC-2,OU=Testing Division,O=Example Company,L=Tashkent,ST=Some State,C=UZ"
525+
519526
noc_ica_cert_1_path="integration_tests/constants/noc_cert_1"
520527
noc_ica_cert_1_subject="MIGCMQswCQYDVQQGEwJVWjETMBEGA1UECAwKU29tZSBTdGF0ZTETMBEGA1UEBwwKU29tZSBTdGF0ZTEYMBYGA1UECgwPRXhhbXBsZSBDb21wYW55MRkwFwYDVQQLDBBUZXN0aW5nIERpdmlzaW9uMRQwEgYDVQQDDAtOT0MtY2hpbGQtMQ=="
521528
noc_ica_cert_1_subject_key_id="02:72:6E:BC:BB:EF:D6:BD:8D:9B:42:AE:D4:3C:C0:55:5F:66:3A:B3"
522529
noc_ica_cert_1_serial_number="631388393741945881054190991612463928825155142122"
523530

531+
noc_ica_cert_2_path="integration_tests/constants/noc_cert_2"
532+
noc_ica_cert_2_subject="MIGCMQswCQYDVQQGEwJVWjETMBEGA1UECAwKU29tZSBTdGF0ZTETMBEGA1UEBwwKU29tZSBTdGF0ZTEYMBYGA1UECgwPRXhhbXBsZSBDb21wYW55MRkwFwYDVQQLDBBUZXN0aW5nIERpdmlzaW9uMRQwEgYDVQQDDAtOT0MtY2hpbGQtMg=="
533+
noc_ica_cert_2_subject_key_id="87:48:A2:33:12:1F:51:5C:93:E6:90:40:4A:2C:AB:9E:D6:19:E5:AD"
534+
noc_ica_cert_2_serial_number="361372967010167010646904372658654439710639340814"
535+
524536
crl_signer_delegated_by_pai_1="integration_tests/constants/leaf_cert_with_vid_65521"
525537
delegator_cert_with_vid_65521_path="integration_tests/constants/intermediate_cert_with_vid_1"
526538
delegator_cert_with_vid_subject_key_id="0E8CE8C8B8AA50BC258556B9B19CC2C7D9C52F17"
@@ -817,6 +829,20 @@ check_response "$result" "\"code\": 0"
817829

818830
test_divider
819831

832+
echo "Add NOC Root certificate by vendor with VID = $vid_for_1_4"
833+
result=$(echo "$passphrase" | $DCLD_BIN_NEW tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_2_path" --from $vendor_account_for_1_4 --yes)
834+
result=$(get_txn_result "$result")
835+
check_response "$result" "\"code\": 0"
836+
837+
test_divider
838+
839+
echo "Add NOC ICA certificate by vendor with VID = $vid_for_1_4"
840+
result=$(echo "$passphrase" | $DCLD_BIN_NEW tx pki add-noc-x509-ica-cert --certificate="$noc_ica_cert_2_path" --from $vendor_account_for_1_4 --yes)
841+
result=$(get_txn_result "$result")
842+
check_response "$result" "\"code\": 0"
843+
844+
test_divider
845+
820846
echo "Revoke NOC root certificate by vendor with VID = $vid_for_1_4"
821847
result=$(echo "$passphrase" | $DCLD_BIN_NEW tx pki revoke-noc-x509-root-cert --subject="$noc_root_cert_1_subject" --subject-key-id="$noc_root_cert_1_subject_key_id" --from=$vendor_account_for_1_4 --yes)
822848
result=$(get_txn_result "$result")
@@ -1214,6 +1240,7 @@ echo "Get revoked x509 certificate"
12141240
result=$($DCLD_BIN_NEW query pki revoked-x509-cert --subject=$intermediate_cert_with_vid_subject --subject-key-id=$intermediate_cert_with_vid_subject_key_id)
12151241
check_response "$result" "\"subject\": \"$intermediate_cert_with_vid_subject\""
12161242
check_response "$result" "\"subjectKeyId\": \"$intermediate_cert_with_vid_subject_key_id\""
1243+
check_response "$result" "\"vid\": $intermediate_cert_with_vid_65521_vid"
12171244

12181245
echo "Get proposed x509 root certificate to revoke"
12191246
result=$($DCLD_BIN_NEW query pki proposed-x509-root-cert-to-revoke --subject=$root_cert_with_vid_subject --subject-key-id=$root_cert_with_vid_subject_key_id)
@@ -1241,6 +1268,21 @@ check_response "$result" "\"issuerSubjectKeyID\": \"$issuer_subject_key_id\""
12411268
check_response "$result" "\"label\": \"$product_label_for_1_4\""
12421269
check_response "$result" "\"dataURL\": \"$test_data_url_for_1_4\""
12431270

1271+
echo "Get all noc x509 root certificates by vid $vid_for_1_4"
1272+
result=$($DCLD_BIN_NEW query pki noc-x509-root-certs --vid=$vid_for_1_4)
1273+
check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\""
1274+
check_response "$result" "$noc_root_cert_2_subject_key_id"
1275+
1276+
echo "Get all noc x509 root certificates by vid=$vid_for_1_4 and skid=$noc_root_cert_2_subject_key_id"
1277+
result=$($DCLD_BIN_NEW query pki noc-x509-certs --vid=$vid_for_1_4 --subject-key-id=$noc_root_cert_2_subject_key_id)
1278+
check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\""
1279+
check_response "$result" "$noc_root_cert_2_subject_key_id"
1280+
1281+
echo "Get all noc x509 root certificates by vid $vid_for_1_4 and skid=$noc_ica_cert_2_subject_key_id"
1282+
result=$($DCLD_BIN_NEW query pki noc-x509-certs --vid=$vid_for_1_4 --subject-key-id=$noc_ica_cert_2_subject_key_id)
1283+
check_response "$result" "\"subject\": \"$noc_ica_cert_2_subject\""
1284+
check_response "$result" "$noc_ica_cert_2_subject_key_id"
1285+
12441286
test_divider
12451287

12461288
# AUTH

integration_tests/upgrade/add-new-node-after-upgrade.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ trap cleanup EXIT
5050

5151
check_adding_new_node() {
5252
local stable_binary_version="${1:-0.12.1}"
53-
local latest_binary_version="${2:-1.4.0-dev3}"
53+
local latest_binary_version="${2:-1.4.1-pre2}"
5454

5555
echo "1. run $node_name container"
5656
docker run -d --name $node_name --ip $ip -p "$node_p2p_port-$node_client_port:26656-26657" --network $docker_network -i dcledger

x/dclauth/module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
164164
}
165165

166166
// ConsensusVersion implements ConsensusVersion.
167-
func (AppModule) ConsensusVersion() uint64 { return 1 }
167+
func (AppModule) ConsensusVersion() uint64 { return 2 }
168168

169169
// BeginBlock executes all ABCI BeginBlock logic respective to the dclauth module.
170170
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}

x/model/module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
145145
}
146146

147147
// ConsensusVersion implements ConsensusVersion.
148-
func (AppModule) ConsensusVersion() uint64 { return 2 }
148+
func (AppModule) ConsensusVersion() uint64 { return 3 }
149149

150150
// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
151151
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}

0 commit comments

Comments
 (0)