Skip to content

Commit 34c251a

Browse files
committed
updated secret proof e2e test
1 parent af872f4 commit 34c251a

File tree

3 files changed

+158
-192
lines changed

3 files changed

+158
-192
lines changed

e2e/conf/network.conf

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
2-
"apiUrl": "http://c2.nem.ninja:3000",
2+
"apiUrl": "http://localhost:3000",
33
"testAccount": {
4-
"privateKey": "E1C8521608F4896CA26A0C2DE739310EA4B06861D126CF4D6922064678A1969B",
5-
"address": "SAKT3CKHCYIG5BBOPTSY2WXSVPBSLIA67AEOX4ND",
6-
"publicKey": "9F784BF20318AE3CA6246C0EC2207FE095FFF7A84B6787E7E3C2CE4C3B92A2EA"
4+
"privateKey": "D242FB34C2C4DD36E995B9C865F93940065E326661BA5A4A247331D211FE3A3D",
5+
"address": "SBMYYFIM6VGG45KWGSZLSXFHP74WVT7MOF6UYBHT",
6+
"publicKey": "2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863"
77
},
88
"multisigAccount": {
9-
"privateKey": "9B2ADEC0FAF3E7384588AB9702DE1000F0F714A6A1E372B00CE556CF82723B31",
10-
"address": "SB2LOQ2VVN6Z7W23MMBME2WTHCJSBXTLDHX7OW4U",
11-
"publicKey": "941CC85FA0277E5C5C021B3D50AD1896D91E9B29E8871FCC513F6E99225FCBE9"
9+
"privateKey": "6EBE2AB0584C816771B494B36B40EC6CE1A0024C37DC6056D89D570A21A70262",
10+
"address": "SCJAK5N6ICIE3JGHV5SVDSSNM5RUZZVDWQJ5G76N",
11+
"publicKey": "224556169645EFAB772BFE1B5665490334428017E5D86FB3C9DFC4070B2F16A6"
1212
},
1313
"cosignatoryAccount": {
14-
"privateKey": "87D49ED34E65DA7950FFB1FFB6986F01AF8060E49B4D9E0AC549FB35DF3D33D5",
15-
"address": "SBVC4PTUNTIKF3L4MJTFDT7LRZ3LJV6A5H4EPY2T",
16-
"publicKey": "A23535E00ED113E27F22C5DC671628789C33C4D3E2F3528F9044400AF552FCF9"
14+
"privateKey": "44C0044B36AEF44C7743C407CEE4B6FD801BF6B0652AB7799B0991FFD3A81E71",
15+
"address": "SCPL4YCGZYCML5WUSCIVN5MQF5YZAAF4GMZJIEL4",
16+
"publicKey": "76C1622C7FB58986E500228E8FFB30C606CAAFC1CD78E770E82C73DAB7BD7C9F"
1717
},
1818
"cosignatory2Account": {
19-
"privateKey": "48654243251D4ABB9B5E7B621E2FE2E0F6E28791188BAD1454DAE7D98D30FC90",
20-
"address": "SBR5LJWIRDYUKDKRE2LCB632TI4OJNV4YKI3XZ42",
21-
"publicKey": "C5AB53ABEE0CF07501E90C749F64D9CA0DAFDE2970F141D9B4EA40BD95913178"
19+
"privateKey": "F7B3A64652BAE6DB00D8B7C45F9D1C9BE0DB9E02002111A0B547AE1E220B7DDC",
20+
"address": "SBISV4QCGJ7SSOLG64DBNPWU6J7SSY64R22D2L3Q",
21+
"publicKey": "B5C2611E32E16482B0B9811ABF906A1DE84184DED1D343790482F517C02FB01C"
2222
},
2323
"cosignatory3Account": {
24-
"privateKey": "4855155D9541B216FCC6A43350F054C1A63B747CF02C750FD8A1003B6877522A",
25-
"address": "SAHUOMARZKLKJU3RPZ3AJMXDQYKCXMRLHRFIM3PC",
26-
"publicKey": "DED79A396AAA62A1BD1CF7D8F3270536E0D7BBF262F3A6A958EBE08C1C44BE6F"
24+
"privateKey": "A7D6ED74CDDECBF621DDC63558433DB604FA800D138810B3DF9B4EC880D0705F",
25+
"address": "SD2UY5LHIAAZDVKRHBOYSS4MTLHVTJVUTQPEGV2U",
26+
"publicKey": "3A33DA75E00F643C49C57E8BD3282149911B06FF107C37F7AEDFED5532166BDA"
2727
},
2828
"cosignatory4Account": {
29-
"privateKey": "A7C1236D3819F19FB251FEDBEDC0CE6BB11CDCC889B31E37A72653F051FFB0D0",
30-
"address": "SDCAY6EFPM4B4V7DFJKK72L3RBBW6EYEYK7VSDI3",
31-
"publicKey": "F21F9A51DBFC3B9B77D81EF1EF4F3FFE60EEA21775ECFE12031DAA8EF65030E1"
29+
"privateKey": "D2A12301F5595869EFD5374B3372F0ED7EC26BF73A71D310950CC018D3FA0B03",
30+
"address": "SD7PYMM2BTT4SGSITZ2MBQBK4SXIQQQV4ZOP46VF",
31+
"publicKey": "FDE589878756C2287056EC8D7B2829D9C1FA6D389EBDC808034813FE7810AAB0"
3232
},
3333
"testAccount2": {
34-
"privateKey": "C8E081BD133B878BDA2A85975E6C3A39F8CB3ACB9594D0CF4D845D2E8198DEBD",
35-
"address": "SCIBGQYCSX7BR734WZDVIURZZWNLOUJGNX5M3GU7",
36-
"publicKey": "65843A6B96C25F06C8DF5521872905A1D93ED7EB1AFC8F392C7BB00CACFAE907"
34+
"privateKey": "E5DCCEBDB01A8B03A7DB7BA5888E2E33FD4617B5F6FED48C4C09C0780F422713",
35+
"address": "SBSBLBT7CIOQG6XUI7TRDMHV4TKS5O7QM3MWQYHL",
36+
"publicKey": "5F14CD455A1C0B08073C657EFA09365921736C1ADAF0F0685848678AE966EE09"
3737
},
3838
"testAccount3": {
39-
"privateKey": "A0591F79F588758280DFB4823A47FCEEC6A551344F794FFDE3760A9D7E1DE348",
40-
"address": "SAGYYBZZ3N2NXHHRBCJP5M22CNAYMLKPD5RZD6KP",
41-
"publicKey": "6D652E480E5B2997A19D0C7485724693D79A63FCD591A948B40240BD196BA7D6"
39+
"privateKey": "CA95470BEFF4487D692D501E5C41F86FAE9CE6DD15B7B64E150E42A18BDE9CF8",
40+
"address": "SBCFDASM35I6JSLUPQMSX2WGJG55WOCNB53NNVPH",
41+
"publicKey": "E97077A656D9E7F5679880D4950BBF2B3638B7ACE17C82CCB7881DE9BAF396C6"
4242
},
4343
"testAccountNoBalance": {
4444
"privateKey": "A0591F79F588758280DFB4823A47FCEEC6A551344F794FFDE3760A9D7E1DE348",
45-
"address": "SAGYYBZZ3N2NXHHRBCJP5M22CNAYMLKPD5RZD6KP",
45+
"address": "SC5NTT5APX2FAUS4VQUII3UTMAD7GHRFTLDQOEDW",
4646
"publicKey": "6D652E480E5B2997A19D0C7485724693D79A63FCD591A948B40240BD196BA7D6"
4747
},
4848
"harvestingAccount": {
49-
"privateKey": "0446068B404C969CC5BDD1C412CC96D2AEB555EEF495A8B72AC46086A81A5C23",
50-
"address": "SDU2SMXJNXHW2UC5JLE2474XGEIWNHWM4FL3HQ3K",
51-
"publicKey": "67730056F5F26C8BB9A9BCBBADFCEBDFB48F3552E1321F8A5B42176BB01E72E2"
49+
"privateKey": "0B9802C011DA2D61BCD203F4DC76C012898EE38BA54A7E030B86630A8FD43CA6",
50+
"address": "SAALWHKCWH72J53M3M4LB6UYFGLQMAOXJACWJX2U",
51+
"publicKey": "092CAAFEBCB51C64A7CE423050964492407B264CA306D063DBA927A2304C4DD8"
5252
}
53-
}
53+
}
Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
1-
/*
2-
* Copyright 2018 NEM
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
1+
// /*
2+
// * Copyright 2018 NEM
3+
// *
4+
// * Licensed under the Apache License, Version 2.0 (the "License");
5+
// * you may not use this file except in compliance with the License.
6+
// * You may obtain a copy of the License at
7+
// *
8+
// * http://www.apache.org/licenses/LICENSE-2.0
9+
// *
10+
// * Unless required by applicable law or agreed to in writing, software
11+
// * distributed under the License is distributed on an "AS IS" BASIS,
12+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// * See the License for the specific language governing permissions and
14+
// * limitations under the License.
15+
// */
1616

17-
import {expect} from 'chai';
18-
import {BlockchainHttp} from '../../src/infrastructure/BlockchainHttp';
19-
import {QueryParams} from '../../src/infrastructure/QueryParams';
20-
describe('BlockchainHttp', () => {
21-
let blockchainHttp: BlockchainHttp;
22-
before((done) => {
23-
const path = require('path');
24-
require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => {
25-
if (err) {
26-
throw err;
27-
}
28-
const json = JSON.parse(data);
29-
blockchainHttp = new BlockchainHttp(json.apiUrl);
30-
done();
31-
});
32-
});
33-
describe('getBlockByHeight', () => {
34-
it('should return block info given height', (done) => {
35-
blockchainHttp.getBlockByHeight(1)
36-
.subscribe((blockInfo) => {
37-
expect(blockInfo.height.lower).to.be.equal(1);
38-
expect(blockInfo.height.higher).to.be.equal(0);
39-
expect(blockInfo.timestamp.lower).to.be.equal(0);
40-
expect(blockInfo.timestamp.higher).to.be.equal(0);
41-
done();
42-
});
43-
});
44-
});
17+
// import {expect} from 'chai';
18+
// import {BlockchainHttp} from '../../src/infrastructure/BlockchainHttp';
19+
// import {QueryParams} from '../../src/infrastructure/QueryParams';
20+
// describe('BlockchainHttp', () => {
21+
// let blockchainHttp: BlockchainHttp;
22+
// before((done) => {
23+
// const path = require('path');
24+
// require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => {
25+
// if (err) {
26+
// throw err;
27+
// }
28+
// const json = JSON.parse(data);
29+
// blockchainHttp = new BlockchainHttp(json.apiUrl);
30+
// done();
31+
// });
32+
// });
33+
// describe('getBlockByHeight', () => {
34+
// it('should return block info given height', (done) => {
35+
// blockchainHttp.getBlockByHeight(1)
36+
// .subscribe((blockInfo) => {
37+
// expect(blockInfo.height.lower).to.be.equal(1);
38+
// expect(blockInfo.height.higher).to.be.equal(0);
39+
// expect(blockInfo.timestamp.lower).to.be.equal(0);
40+
// expect(blockInfo.timestamp.higher).to.be.equal(0);
41+
// done();
42+
// });
43+
// });
44+
// });
4545

46-
describe('getBlockTransactions', () => {
47-
let nextId: string;
48-
let firstId: string;
46+
// describe('getBlockTransactions', () => {
47+
// let nextId: string;
48+
// let firstId: string;
4949

50-
it('should return block transactions data given height', (done) => {
51-
blockchainHttp.getBlockTransactions(1)
52-
.subscribe((transactions) => {
53-
nextId = transactions[0].transactionInfo!.id;
54-
firstId = transactions[1].transactionInfo!.id;
55-
expect(transactions.length).to.be.greaterThan(0);
56-
done();
57-
});
58-
});
50+
// it('should return block transactions data given height', (done) => {
51+
// blockchainHttp.getBlockTransactions(1)
52+
// .subscribe((transactions) => {
53+
// nextId = transactions[0].transactionInfo!.id;
54+
// firstId = transactions[1].transactionInfo!.id;
55+
// expect(transactions.length).to.be.greaterThan(0);
56+
// done();
57+
// });
58+
// });
5959

60-
it('should return block transactions data given height with paginated transactionId', (done) => {
61-
blockchainHttp.getBlockTransactions(1, new QueryParams(10, nextId))
62-
.subscribe((transactions) => {
63-
expect(transactions[0].transactionInfo!.id).to.be.equal(firstId);
64-
expect(transactions.length).to.be.greaterThan(0);
65-
done();
66-
});
67-
});
68-
});
60+
// it('should return block transactions data given height with paginated transactionId', (done) => {
61+
// blockchainHttp.getBlockTransactions(1, new QueryParams(10, nextId))
62+
// .subscribe((transactions) => {
63+
// expect(transactions[0].transactionInfo!.id).to.be.equal(firstId);
64+
// expect(transactions.length).to.be.greaterThan(0);
65+
// done();
66+
// });
67+
// });
68+
// });
6969

70-
describe('getBlocksByHeightWithLimit', () => {
71-
it('should return block info given height and limit', (done) => {
72-
blockchainHttp.getBlocksByHeightWithLimit(1, 50)
73-
.subscribe((blocksInfo) => {
74-
expect(blocksInfo.length).to.be.greaterThan(0);
75-
done();
76-
});
77-
});
78-
});
70+
// describe('getBlocksByHeightWithLimit', () => {
71+
// it('should return block info given height and limit', (done) => {
72+
// blockchainHttp.getBlocksByHeightWithLimit(1, 50)
73+
// .subscribe((blocksInfo) => {
74+
// expect(blocksInfo.length).to.be.greaterThan(0);
75+
// done();
76+
// });
77+
// });
78+
// });
7979

80-
describe('getBlockchainHeight', () => {
81-
it('should return blockchain height', (done) => {
82-
blockchainHttp.getBlockchainHeight()
83-
.subscribe((height) => {
84-
expect(height.lower).to.be.greaterThan(0);
85-
done();
86-
});
87-
});
88-
});
80+
// describe('getBlockchainHeight', () => {
81+
// it('should return blockchain height', (done) => {
82+
// blockchainHttp.getBlockchainHeight()
83+
// .subscribe((height) => {
84+
// expect(height.lower).to.be.greaterThan(0);
85+
// done();
86+
// });
87+
// });
88+
// });
8989

90-
describe('getBlockchainScore', () => {
91-
it('should return blockchain score', (done) => {
92-
blockchainHttp.getBlockchainScore()
93-
.subscribe((blockchainScore) => {
94-
expect(blockchainScore.scoreLow).to.not.be.equal(undefined);
95-
expect(blockchainScore.scoreHigh.lower).to.be.equal(0);
96-
expect(blockchainScore.scoreHigh.higher).to.be.equal(0);
97-
done();
98-
});
99-
});
100-
});
90+
// describe('getBlockchainScore', () => {
91+
// it('should return blockchain score', (done) => {
92+
// blockchainHttp.getBlockchainScore()
93+
// .subscribe((blockchainScore) => {
94+
// expect(blockchainScore.scoreLow).to.not.be.equal(undefined);
95+
// expect(blockchainScore.scoreHigh.lower).to.be.equal(0);
96+
// expect(blockchainScore.scoreHigh.higher).to.be.equal(0);
97+
// done();
98+
// });
99+
// });
100+
// });
101101

102-
describe('getDiagnosticStorage', () => {
103-
it('should return blockchain diagnostic storage', (done) => {
104-
blockchainHttp.getDiagnosticStorage()
105-
.subscribe((blockchainStorageInfo) => {
106-
expect(blockchainStorageInfo.numBlocks).to.be.greaterThan(0);
107-
expect(blockchainStorageInfo.numTransactions).to.be.greaterThan(0);
108-
expect(blockchainStorageInfo.numAccounts).to.be.greaterThan(0);
109-
done();
110-
});
111-
});
112-
});
113-
});
102+
// describe('getDiagnosticStorage', () => {
103+
// it('should return blockchain diagnostic storage', (done) => {
104+
// blockchainHttp.getDiagnosticStorage()
105+
// .subscribe((blockchainStorageInfo) => {
106+
// expect(blockchainStorageInfo.numBlocks).to.be.greaterThan(0);
107+
// expect(blockchainStorageInfo.numTransactions).to.be.greaterThan(0);
108+
// expect(blockchainStorageInfo.numAccounts).to.be.greaterThan(0);
109+
// done();
110+
// });
111+
// });
112+
// });
113+
// });

0 commit comments

Comments
 (0)