Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-10172] Extended Unit test for discovery
This change set adds an extended unit test for discovery, which: - Uses production implementations of all discovery components, including the discovery support objects found under discovery/ - Uses production implementations of MSPs and real x509 identities - Uses a real genesis block from configtxgen for config query testing - Uses a mock gossip implementation - Uses a mock ledger implementation, but a production lifecycle support (the object that intermediates between discovery and the ledger and is found under core/cclifecycle - Uses real gRPC servers and clients with TLS. The gRPC servers listen to ephemeral ports, so we won't get a bind: already in use error in CI ;) The test contains the following tests: TestGreenPath: Tests all query types, specifically: - cc2cc endorsers query and endorsers query with collections - both channel and local peer query - config query TestRevocation: - Queries once to warmup the cache - Queries twice to ensure the underlying MSP isn't used because the ACL cache takes the hit - Advances the config sequence and artificially revokes all identities in the MSP manager - Queries thrice and sees that the cache isn't hit, and that "access denied" is returned TestEndorsementComputationFailure: - tests a case where the collection policy doesn't cover any possible principal set combination for endorsement TestLedgerFailure: - Tests that querying from the ledger fails in some of the keys Change-Id: I717572e04c8f178ef10bd3807f707cf58da0b406 Signed-off-by: yacovm <yacovm@il.ibm.com>
- Loading branch information