@@ -32,68 +32,68 @@ vid=$RANDOM
32
32
pid=$RANDOM
33
33
34
34
echo " Add Model with VID: $vid PID: $pid : Not Vendor"
35
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $user_account --yes)
35
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $user_account --yes)
36
36
check_response_and_report " $result " " \" success\" : false"
37
37
check_response_and_report " $result " " \" code\" : 4"
38
38
echo " $result "
39
39
40
40
echo " Add Model with VID: $vid PID: $pid : Twice"
41
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes)
42
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes)
41
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes)
42
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Device #1" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes)
43
43
check_response_and_report " $result " " \" success\" : false"
44
44
check_response_and_report " $result " " \" code\" : 501"
45
45
echo " $result "
46
46
47
47
# CLI side errors
48
48
49
49
echo " Add Model with VID: $vid PID: $pid : Unknown account"
50
- result=$( dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name 1" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from " Unknown" 2>&1 ) || true
50
+ result=$( dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name 1" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from " Unknown" 2>&1 ) || true
51
51
check_response_and_report " $result " " Key Unknown not found"
52
52
53
53
echo " Add model with invalid VID/PID"
54
54
for i in " 0" " string"
55
55
do
56
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$i --pid=$pid --name=" Name" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
56
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$i --pid=$pid --name=" Name" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
57
57
check_response_and_report " $result " " Invalid VID"
58
58
59
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$i --name=" Name" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
59
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$i --name=" Name" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
60
60
check_response_and_report " $result " " Invalid PID"
61
61
done
62
62
63
63
echo " Add model with epmty name"
64
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" " --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
64
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" " --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
65
65
check_response_and_report " $result " " Code: 6"
66
66
check_response_and_report " $result " " Invalid Name"
67
67
68
68
echo " Add model with epmty description"
69
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" " --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
69
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" " --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
70
70
check_response_and_report " $result " " Code: 6"
71
71
check_response_and_report " $result " " Invalid Description"
72
72
73
73
echo " Add model with epmty SKU"
74
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" " --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
74
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" " --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
75
75
check_response_and_report " $result " " Code: 6"
76
76
check_response_and_report " $result " " Invalid SKU"
77
77
78
- echo " Add model with epmty Firmwere Version"
79
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --firmware-version=" " --hardware-version=" 2.0" --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
80
- check_response_and_report " $result " " Code: 6"
81
- check_response_and_report " $result " " Invalid FirmwareVersion"
82
-
83
78
echo " Add model with epmty Hardware Version"
84
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" " --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
79
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --hardware -version=" " --firmware -version=" 2.0 " --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
85
80
check_response_and_report " $result " " Code: 6"
86
81
check_response_and_report " $result " " Invalid HardwareVersion"
87
82
83
+ echo " Add model with epmty Firmwere Version"
84
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --hardware-version=" 1.1" --firmware-version=" " --tis-or-trp-testing-completed=true --from $vendor_account --yes 2>&1 ) || true
85
+ check_response_and_report " $result " " Code: 6"
86
+ check_response_and_report " $result " " Invalid FirmwareVersion"
87
+
88
88
echo " Add model with Invalid TIS flag"
89
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=" string" --from $vendor_account --yes 2>&1 ) || true
89
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=" string" --from $vendor_account --yes 2>&1 ) || true
90
90
check_response_and_report " $result " " Code: 6"
91
91
check_response_and_report " $result " " Invalid Tis-or-trp-testing-completed"
92
92
93
93
echo " Add model without --from flag"
94
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --tis-or-trp-testing-completed=true --yes 2>&1 ) || true
94
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" Name" --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --tis-or-trp-testing-completed=true --yes 2>&1 ) || true
95
95
check_response_and_report " $result " " required flag(s) \" from\" not set"
96
96
97
97
echo " Add model with not enought parameters"
98
- result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" " --description=" Device Description" --sku=" SKU12FS" --firmware -version=" 1.0 " --hardware -version=" 2.0" --from $vendor_account --yes 2>&1 ) || true
98
+ result=$( echo " test1234" | dclcli tx modelinfo add-model --vid=$vid --pid=$pid --name=" " --description=" Device Description" --sku=" SKU12FS" --hardware -version=" 1.1 " --firmware -version=" 2.0" --from $vendor_account --yes 2>&1 ) || true
99
99
check_response_and_report " $result " " required flag(s) \" tis-or-trp-testing-completed\" not set"
0 commit comments