14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- : ${LEDGER_URL := http:// 127.0.0.1: 8008}
17
+ : ${PDO_LEDGER_URL := http:// 127.0.0.1: 8008}
18
18
19
19
PY3_VERSION=$( python --version | sed ' s/Python 3\.\([0-9]\).*/\1/' )
20
20
if [[ $PY3_VERSION -lt 5 ]]; then
@@ -62,8 +62,8 @@ trap cleanup EXIT
62
62
63
63
# start the provisioning and enclave services
64
64
yell start enclave and provisioning services
65
- try ${VIRTUAL_ENV} /opt/pdo/bin/ps-start.sh --count 5 --ledger ${LEDGER_URL } --clean > /dev/null
66
- try ${VIRTUAL_ENV} /opt/pdo/bin/es-start.sh --count 5 --ledger ${LEDGER_URL } --clean > /dev/null
65
+ try ${VIRTUAL_ENV} /opt/pdo/bin/ps-start.sh --count 5 --ledger ${PDO_LEDGER_URL } --clean > /dev/null
66
+ try ${VIRTUAL_ENV} /opt/pdo/bin/es-start.sh --count 5 --ledger ${PDO_LEDGER_URL } --clean > /dev/null
67
67
68
68
cd ${SRCDIR} /eservice/tests
69
69
yell start secrets test
@@ -100,19 +100,19 @@ try python test-contract.py --no-ledger --contract mock-contract \
100
100
--logfile __screen__ --loglevel warn
101
101
102
102
yell start request test with provisioning and enclave services
103
- try python test-request.py --ledger ${LEDGER_URL } \
103
+ try python test-request.py --ledger ${PDO_LEDGER_URL } \
104
104
--pservice http://localhost:7001/ http://localhost:7002 http://localhost:7003 \
105
105
--eservice http://localhost:7101/ \
106
106
--logfile __screen__ --loglevel warn
107
107
108
108
yell start contract test with provisioning and enclave services
109
- try python test-contract.py --ledger ${LEDGER_URL } --contract integer-key \
109
+ try python test-contract.py --ledger ${PDO_LEDGER_URL } --contract integer-key \
110
110
--pservice http://localhost:7001/ http://localhost:7002 http://localhost:7003 \
111
111
--eservice http://localhost:7101/ \
112
112
--logfile __screen__ --loglevel warn
113
113
114
114
yell start mock contract test with ledger, this should fail dependency check
115
- python test-contract.py --ledger ${LEDGER_URL } --contract mock-contract \
115
+ python test-contract.py --ledger ${PDO_LEDGER_URL } --contract mock-contract \
116
116
--logfile __screen__ --loglevel warn
117
117
if [ $? == 0 ]; then
118
118
die mock contract test succeeded though it should have failed
@@ -123,24 +123,24 @@ yell ---------- start pdo-create and pdo-update tests ----------
123
123
# # -----------------------------------------------------------------
124
124
125
125
# make sure we have the necessary files in place
126
- CONFIG_FILE=${CONTRACTHOME } /etc/pcontract.toml
126
+ CONFIG_FILE=${PDO_HOME } /etc/pcontract.toml
127
127
if [ ! -f ${CONFIG_FILE} ]; then
128
128
die missing client configuration file, ${CONFIG_FILE}
129
129
fi
130
130
131
- CONTRACT_FILE=${CONTRACTHOME } /contracts/_mock-contract.scm
131
+ CONTRACT_FILE=${PDO_HOME } /contracts/_mock-contract.scm
132
132
if [ ! -f ${CONTRACT_FILE} ]; then
133
133
die missing contract source file, ${CONTRACT_FILE}
134
134
fi
135
135
136
136
yell create the contract
137
- try pdo-create --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
137
+ try pdo-create --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
138
138
--logfile __screen__ --loglevel warn \
139
139
--identity user1 --save-file ${SAVE_FILE} \
140
140
--contract mock-contract --source _mock-contract.scm
141
141
142
142
yell increment the value with a simple expression
143
- value=$( pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
143
+ value=$( pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
144
144
--logfile __screen__ --loglevel warn \
145
145
--identity user1 --save-file ${SAVE_FILE} \
146
146
" '(inc-value)" )
@@ -149,7 +149,7 @@ if [ $value != "1" ]; then
149
149
fi
150
150
151
151
yell increment the value with a evaluated expression
152
- value=$( pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
152
+ value=$( pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
153
153
--logfile __screen__ --loglevel warn \
154
154
--identity user1 --save-file ${SAVE_FILE} \
155
155
" (list 'inc-value)" )
@@ -158,7 +158,7 @@ if [ $value != "2" ]; then
158
158
fi
159
159
160
160
yell get the value and check it
161
- value=$( pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
161
+ value=$( pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
162
162
--logfile __screen__ --loglevel warn \
163
163
--identity user1 --save-file ${SAVE_FILE} \
164
164
" '(get-value)" )
@@ -167,7 +167,7 @@ if [ $value != "2" ]; then
167
167
fi
168
168
169
169
yell invalid method, this should fail
170
- pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
170
+ pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
171
171
--logfile __screen__ --loglevel warn \
172
172
--identity user1 --save-file ${SAVE_FILE} \
173
173
" '(no-such-method)"
@@ -176,7 +176,7 @@ if [ $? == 0 ]; then
176
176
fi
177
177
178
178
yell invalid expression, this should fail
179
- pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
179
+ pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
180
180
--logfile __screen__ --loglevel warn \
181
181
--identity user1 --save-file ${SAVE_FILE} \
182
182
" '(no-such-method"
@@ -185,7 +185,7 @@ if [ $? == 0 ]; then
185
185
fi
186
186
187
187
yell policy violation with identity, this should fail
188
- pdo-update --config ${CONFIG_FILE} --ledger ${LEDGER_URL } \
188
+ pdo-update --config ${CONFIG_FILE} --ledger ${PDO_LEDGER_URL } \
189
189
--logfile __screen__ --loglevel warn \
190
190
--identity user2 --save-file ${SAVE_FILE} \
191
191
" '(get-value)"
0 commit comments