Skip to content
  • Yoav Tock's avatar
    FAB-12991 kafka2raft e2e tests green path · 6604d494
    Yoav Tock authored
    
    
    This task focuses on testing the consensus-type migration "green" path,
    that was introduced in FAB-13264.
    
    The main contribution is in migration_test.go, which defines 3 test-cases
    that test the green path. This is not the complete test suite for migration.
    It is introduced in this stage to allow reviewers to get the full picture
    of the feature defined in FAB-13264. The tests for the abort path and failure
    scenarios will be added in later tasks.
    
    The three test-cases are:
    
    1. A test that executes the migration flow on the Kafka side
       (from START-TX until COMMIT-TX), on the system channel only.
    2. A test that executes the migration flow on the Kafka side
       (from START-TX, CONTEXT-TX until COMMIT-TX), on the system
       channel and a single application channel. 
    3. A test that executes the migration flow on the Raft side
       (from START-TX, CONTEXT-TX until COMMIT-TX, followed by restart
       of the orderer), on the system channel and a two application channel.
    
    The tests are somewhat overlapping but are verifying different aspects of
    the expected behavior. Overall, the tests verify that the flow of:
    
     - START-TX => CONTEXT-TX (x #std-channels) =>COMMIT-TX => Restart
       => (optional NONE-TX)
    
    results in a functional etcdraft-based ordering service. That is, normal
    transactions can be executed, and new channels can be created.
     
    
    The task introduces some minor changes to the nwo test framework in order to
    support the testing of the new feature:
    
     - Add OrdererCapabilites to Config, since kafka-to-raft migration is gates
       by a new V2_0 capability
       - add the following to tests that read the network config from file
    
         orderercapabilities:
           v20: false
    
     - Adds method to verify failure to update the OrdererConfig
     - Extends the configtx template to include support for the V2_0 orderer
       capability
     - Extend the network.go to
       - support V2_0 orderer capability
       - verify channel creation is blocked
       - support ConsensusType.Type changes
     - Extend standard_networks.go to
       - Support V2_0 orderer capability
       - define a Kafka2Raft and Kafka2RaftMultiChannel configurations for
         migration tests
    
    Change-Id: I043b133b4c716f3bf53512f1999c7dfbc8aa67bb
    Signed-off-by: default avatarYoav Tock <tock@il.ibm.com>
    6604d494