Skip to content

Commit 3df0069

Browse files
authored
test_illegal talks to primary, not hardcoded node (#1682)
1 parent 36a6ca1 commit 3df0069

2 files changed

Lines changed: 60 additions & 61 deletions

File tree

CHANGELOG.md

Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## Unreleased
99

10-
## [0.14.0] - 2020-09-30
10+
## [0.14.0]
1111
### Added
1212
- Nodes can recover rapidly from a snapshot, rather than needing to reprocess an entire ledger (#1656)
1313
- Python client code wraps creation and replacement of an entire JS app bundle in a single operation (#1651)
@@ -25,12 +25,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2525
### Deprecated
2626
- `lua_generic` app is deprecated and will be removed in a future release. Please migrate old Lua apps to JS
2727

28-
## [0.13.4] - 2020-09-23
28+
## [0.13.4]
2929
### Changed
3030
- Fixed infinite memory growth issue (#1639)
3131
- Step CLI updated to 0.15.2 (#1636)
3232

33-
## [0.13.3] - 2020-09-18
33+
## [0.13.3]
3434
### Added
3535
- Sample TypeScript application (#1614, #1596)
3636

@@ -47,17 +47,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4747
### Removed
4848
- Notification server (#1582)
4949

50-
## [0.13.2] - 2020-09-02
50+
## [0.13.2]
5151
### Added
5252
- retire_node_code proposal (#1558)
5353
- Ability to update a collection of JS modules in a single proposal (#1557)
5454

55-
## [0.13.1] - 2020-09-01
55+
## [0.13.1]
5656
### Fixed
5757
- Handle setting multiple subject alternative names correctly in node certificate (#1552)
5858
- Fix host memory check on startup ecall (#1553)
5959

60-
## [0.13.0] - 2020-08-28
60+
## [0.13.0]
6161
### Added
6262
- Experimental
6363
- New CCF nodes can now join from a [snapshot](https://microsoft.github.io/CCF/ccf-0.13.0/operators/start_network.html#resuming-from-existing-snapshot) (#1500, #1532)
@@ -85,18 +85,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8585
- Removed redirection from legacy frontend names (`members` -> `gov`, `nodes` -> `node`, `users` -> `app`) (#1543)
8686
- Removed old `install()` API, replaced by `make_endpoint()` in [0.11.1](https://github.com/microsoft/CCF/releases/tag/ccf-0.11.1) (#1541)
8787

88-
## [0.12.2] - 2020-07-31
88+
## [0.12.2]
8989
### Fixed
9090
- Fix published containers
9191

92-
## [0.12.1] - 2020-07-31
92+
## [0.12.1]
9393
### Changed
9494
- Release tarball replaced by a .deb
9595

9696
### Fixed
9797
- Fix LVI build for applications using CCF (#1466)
9898

99-
## [0.12.0] - 2020-07-29
99+
## [0.12.0]
100100
### Added
101101
- Tooling
102102
- New Python proposal and vote generator (#1370). See [docs](https://microsoft.github.io/CCF/ccf-0.12.0/members/proposals.html#creating-a-proposal).
@@ -127,7 +127,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
127127
### Removed
128128
- `mkSign` endpoint (#1398).
129129

130-
## [0.11.7] - 2020-07-01
130+
## [0.11.7]
131131
### Changed
132132
1. Fix a bug that could cause signatures not to be recorded on transactions hitting conflicts (#1346)
133133
2. Fix a bug that could allow transactions to be executed by members before a recovered network was fully opened (#1347)
@@ -137,7 +137,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
137137
1. All format and linting checks are now covered by `scripts/ci-checks.sh` (#1359)
138138
2. `node/code` RPC returns all code versions and their status (#1351)
139139

140-
## [0.11.4] - 2020-06-26
140+
## [0.11.4]
141141
### Changed
142142
- Add clang-format to the application CI container, to facilitate application development (#1340)
143143
- Websocket handlers are now distinct, and can be defined by passing `ws::Verb::WEBSOCKET` as a verb to `make_endpoint()` (#1333)
@@ -146,7 +146,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
146146
### Fixed
147147
- Fix application runtime container, which had been missing a dependency in the previous release (#1340)
148148

149-
## [0.11.1] - 2020-06-25
149+
## [0.11.1]
150150
### Added
151151
- CLI tool for managing recovery shares (#1295). [usage](https://microsoft.github.io/CCF/master/members/accept_recovery.html#submitting-recovery-shares)
152152
- New standard endpoint `node/ids` for retrieving node ID from IP address (#1319).
@@ -160,7 +160,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
160160
- Member ACKs are required, even when the service is opening (#1318).
161161
- The naming scheme for releases has changed to be more consistent. The tags will now be in the form `ccf-X.Y.Z`.
162162

163-
## [0.11] - 2020-06-15
163+
## [0.11]
164164
### Changed
165165
- KV reorganisation to enable app-defined serialisation (#1179, #1216, #1234)
166166

@@ -189,7 +189,7 @@ CCF now deals internally only with serialised data in its tables, mapping byte-v
189189
### Removed
190190
- `ccf::Store` and `ccf::Tx` typdefs, in favour of `kv::Store` and `kv::Tx`.
191191

192-
## [0.10] - 2020-05-01
192+
## [0.10]
193193
### Added
194194
- Brand new versioned documentation: https://microsoft.github.io/CCF.
195195
- New `/tx` endpoint to check that a transaction is committed (#1111). See [docs](https://microsoft.github.io/CCF/master/users/issue_commands.html#checking-for-commit).
@@ -213,12 +213,12 @@ CCF now deals internally only with serialised data in its tables, mapping byte-v
213213
### Removed
214214
- `cchost` no longer outputs a sealed secrets file to be used for recovery (#1101).
215215

216-
## [0.9.3] - 2020-04-16
216+
## [0.9.3]
217217
### Added
218218
1. Install artifacts include `virtual` build (#1072)
219219
2. `add_enclave_library_c` is exposed in `ccp_app.cmake` (#1073)
220220

221-
## [0.9.2] - 2020-04-15
221+
## [0.9.2]
222222
### Added
223223
- Handlers can decide if transaction writes are applied independently from error status (#1054)
224224
- Scenario Perf Client is now part of the CCF install to facilitate performance tests (#1058)
@@ -228,11 +228,11 @@ CCF now deals internally only with serialised data in its tables, mapping byte-v
228228
- Member tables are no longer whitelisted for raw_puts (#1041)
229229
- Projects including CCF's CMake files now use the same build type default (#1057)
230230

231-
## [0.9.1] - 2020-04-01
231+
## [0.9.1]
232232
### Added
233233
- `cchost` now supports [file-based configuration](https://microsoft.github.io/CCF/operators/start_network.html#using-a-configuration-file), as well as command-line switches (#1013, #1019)
234234

235-
## [0.9] - 2020-03-27
235+
## [0.9]
236236

237237
This pre-release improves support for handling HTTP requests.
238238

@@ -254,13 +254,13 @@ This pre-release improves support for handling HTTP requests.
254254
- API for installing handlers has changed (#960). See the logging app or [documentation](https://microsoft.github.io/CCF/developers/logging_cpp.html#rpc-handler) for the current style.
255255
- Several standard endpoints are now GET-only, and must be passed a URL query (ie `GET /users/getCommit?id=42`).
256256

257-
## [0.8.2] - 2020-03-13
257+
## [0.8.2]
258258
### Changed
259259
- CCF install can now be installed anywhere (#950).
260260
- PBFT messages are now authenticated (#947).
261261
- Miscellaneous performance improvements (#946).
262262

263-
## [0.8.1] - 2020-03-12
263+
## [0.8.1]
264264
### Added
265265
- PBFT timers can be set from`cchost` CLI (#929). See [docs](https://microsoft.github.io/CCF/developers/consensus.html#consensus-protocols).
266266
- Nodes output their PID in a `cchost.pid` file on start-up (#927).
@@ -274,7 +274,7 @@ This pre-release improves support for handling HTTP requests.
274274
- PBFT performance improvements (#940, #942).
275275
- PBFT ledger private tables are now encrypted (#939).
276276

277-
## [0.8] - 2020-03-04
277+
## [0.8]
278278

279279
This pre-release enables experimental support for running CCF with the PBFT consensus protocol. In providing an experimental release of CCF with PBFT we hope to get feedback from early adopters.
280280

@@ -297,12 +297,12 @@ This pre-release enables experimental support for running CCF with the PBFT cons
297297
### Removed
298298
- FramedTCP support
299299

300-
## [0.7.1] - 2020-02-11
300+
## [0.7.1]
301301
### Added
302302
- Installed Python infrastructure can now be used to launch test networks of external builds (#809)
303303
- Initial threading support, Raft nodes now execute transactions on multiple worker threads (#773, #822)
304304

305-
## [0.7] - 2020-01-30
305+
## [0.7]
306306

307307
This pre-release enables experimental support for Javascript as a CCF runtime, and switches the default transport to HTTP. FramedTCP is still supported in this release (`-DFTCP=ON`) but is deprecated and will be dropped in the next release.
308308

@@ -319,7 +319,7 @@ This pre-release enables experimental support for Javascript as a CCF runtime, a
319319
### Deprecated
320320
- FramedTCP support. Please use the ccf_FTCP.tar.gz release bundle or build CCF with `-DFTCP=ON` if you require FTCP support.
321321

322-
## [0.6] - 2019-12-10
322+
## [0.6]
323323

324324
This pre-release enables support for HTTP in CCF
325325

@@ -338,7 +338,7 @@ This pre-release enables support for HTTP in CCF
338338

339339
Binaries for `cchost` and `libluagenericenc.so` are attached to this release. Note that libluagenericenc.so should be signed before being deployed by CCF (see https://microsoft.github.io/CCF/developers/build_app.html#standalone-signing).
340340

341-
## [0.5] - 2019-11-14
341+
## [0.5]
342342

343343
This pre-release fixes minor issues and clarifies some of `cchost` command line options.
344344

@@ -358,48 +358,47 @@ This pre-release fixes minor issues and clarifies some of `cchost` command line
358358
The `cchost`, `libluagenericenc.so`, `keygenerator` and `memberclient` are also attached to this release to start a CCF network with lua application.
359359
Note that `libluagenericenc.so` should be signed before being deployed by CCF (see https://microsoft.github.io/CCF/developers/build_app.html#standalone-signing).
360360

361-
## [0.4] - 2019-11-04
361+
## [0.4]
362362

363363
In this preview release, it is possible to run CCF with the PBFT consensus algorithm, albeit with significant limitations.
364364

365365
The evercrypt submodule has been removed, the code is instead imported, to make release tarballs easier to use.
366366

367-
## [0.3] - 2019-10-07
367+
## [0.3]
368368

369369
This pre-release implements the genesis model described in the TR, with a distinct service opening phase. See https://microsoft.github.io/CCF/start_network.html for details.
370370

371371
Some discrepancies with the TR remain, and are being tracked under https://github.com/microsoft/CCF/milestone/2
372372

373-
## 0.2 - 2019-06-07
373+
## 0.2
374374

375375
Initial pre-release
376376

377377

378-
[Unreleased]: https://github.com/microsoft/CCF/compare/ccf-0.14.0...HEAD
379-
[0.14.0]: https://github.com/microsoft/CCF/compare/ccf-0.13.4...ccf-0.14.0
380-
[0.13.4]: https://github.com/microsoft/CCF/compare/ccf-0.13.3...ccf-0.13.4
381-
[0.13.3]: https://github.com/microsoft/CCF/compare/ccf-0.13.2...ccf-0.13.3
382-
[0.13.2]: https://github.com/microsoft/CCF/compare/ccf-0.13.1...ccf-0.13.2
383-
[0.13.1]: https://github.com/microsoft/CCF/compare/ccf-0.13.0...ccf-0.13.1
384-
[0.13.0]: https://github.com/microsoft/CCF/compare/ccf-0.12.2...ccf-0.13.0
385-
[0.12.2]: https://github.com/microsoft/CCF/compare/ccf-0.12.1...ccf-0.12.2
386-
[0.12.1]: https://github.com/microsoft/CCF/compare/ccf-0.12.0...ccf-0.12.1
387-
[0.12.0]: https://github.com/microsoft/CCF/compare/ccf-0.11.7...ccf-0.12.0
388-
[0.11.7]: https://github.com/microsoft/CCF/compare/ccf-0.11.4...ccf-0.11.7
389-
[0.11.4]: https://github.com/microsoft/CCF/compare/ccf-0.11.1...ccf-0.11.4
390-
[0.11.1]: https://github.com/microsoft/CCF/compare/0.11...ccf-0.11.1
391-
[0.11]: https://github.com/microsoft/CCF/compare/v0.10...0.11
392-
[0.10]: https://github.com/microsoft/CCF/compare/v0.9.3...v0.10
393-
[0.9.3]: https://github.com/microsoft/CCF/compare/v0.9.2...v0.9.3
394-
[0.9.2]: https://github.com/microsoft/CCF/compare/v0.9.1...v0.9.2
395-
[0.9.1]: https://github.com/microsoft/CCF/compare/v0.9...v0.9.1
396-
[0.9]: https://github.com/microsoft/CCF/compare/v0.8.2...v0.9
397-
[0.8.2]: https://github.com/microsoft/CCF/compare/v0.8.1...v0.8.2
398-
[0.8.1]: https://github.com/microsoft/CCF/compare/v0.8...v0.8.1
399-
[0.8]: https://github.com/microsoft/CCF/compare/v0.7.1...v0.8
400-
[0.7.1]: https://github.com/microsoft/CCF/compare/v0.7...v0.7.1
401-
[0.7]: https://github.com/microsoft/CCF/compare/v0.6...v0.7
402-
[0.6]: https://github.com/microsoft/CCF/compare/v0.5...v0.6
403-
[0.5]: https://github.com/microsoft/CCF/compare/v0.4...v0.5
404-
[0.4]: https://github.com/microsoft/CCF/compare/v0.3...v0.4
405-
[0.3]: https://github.com/microsoft/CCF/compare/v0.2...v0.3
378+
[0.14.0]: https://github.com/microsoft/CCF/releases/tag/ccf-0.14.0
379+
[0.13.4]: https://github.com/microsoft/CCF/releases/tag/ccf-0.13.4
380+
[0.13.3]: https://github.com/microsoft/CCF/releases/tag/ccf-0.13.3
381+
[0.13.2]: https://github.com/microsoft/CCF/releases/tag/ccf-0.13.2
382+
[0.13.1]: https://github.com/microsoft/CCF/releases/tag/ccf-0.13.1
383+
[0.13.0]: https://github.com/microsoft/CCF/releases/tag/ccf-0.13.0
384+
[0.12.2]: https://github.com/microsoft/CCF/releases/tag/ccf-0.12.2
385+
[0.12.1]: https://github.com/microsoft/CCF/releases/tag/ccf-0.12.1
386+
[0.12.0]: https://github.com/microsoft/CCF/releases/tag/ccf-0.12.0
387+
[0.11.7]: https://github.com/microsoft/CCF/releases/tag/ccf-0.11.7
388+
[0.11.4]: https://github.com/microsoft/CCF/releases/tag/ccf-0.11.4
389+
[0.11.1]: https://github.com/microsoft/CCF/releases/tag/ccf-0.11.1
390+
[0.11]: https://github.com/microsoft/CCF/releases/tag/0.11
391+
[0.10]: https://github.com/microsoft/CCF/releases/tag/v0.10
392+
[0.9.3]: https://github.com/microsoft/CCF/releases/tag/v0.9.3
393+
[0.9.2]: https://github.com/microsoft/CCF/releases/tag/v0.9.2
394+
[0.9.1]: https://github.com/microsoft/CCF/releases/tag/v0.9.1
395+
[0.9]: https://github.com/microsoft/CCF/releases/tag/v0.9
396+
[0.8.2]: https://github.com/microsoft/CCF/releases/tag/v0.8.2
397+
[0.8.1]: https://github.com/microsoft/CCF/releases/tag/v0.8.1
398+
[0.8]: https://github.com/microsoft/CCF/releases/tag/v0.8
399+
[0.7.1]: https://github.com/microsoft/CCF/releases/tag/v0.7.1
400+
[0.7]: https://github.com/microsoft/CCF/releases/tag/v0.7
401+
[0.6]: https://github.com/microsoft/CCF/releases/tag/v0.6
402+
[0.5]: https://github.com/microsoft/CCF/releases/tag/v0.5
403+
[0.4]: https://github.com/microsoft/CCF/releases/tag/v0.4
404+
[0.3]: https://github.com/microsoft/CCF/releases/tag/v0.3

tests/e2e_logging.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def test(network, args, verify=True):
4646
@reqs.supports_methods("log/private", "log/public")
4747
@reqs.at_least_n_nodes(2)
4848
def test_illegal(network, args, verify=True):
49+
primary, _ = network.find_primary()
50+
4951
# Send malformed HTTP traffic and check the connection is closed
5052
cafile = cafile = os.path.join(network.common_dir, "networkcert.pem")
5153
context = ssl.create_default_context(cafile=cafile)
@@ -55,10 +57,8 @@ def test_illegal(network, args, verify=True):
5557
keyfile=os.path.join(network.common_dir, "user0_privk.pem"),
5658
)
5759
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
58-
conn = context.wrap_socket(
59-
sock, server_side=False, server_hostname=network.nodes[0].host
60-
)
61-
conn.connect((network.nodes[0].host, network.nodes[0].rpc_port))
60+
conn = context.wrap_socket(sock, server_side=False, server_hostname=primary.host)
61+
conn.connect((primary.host, primary.rpc_port))
6262
conn.sendall(b"NOTAVERB ")
6363
rv = conn.recv(1024)
6464
assert rv == b"", rv

0 commit comments

Comments
 (0)