Esempio n. 1
0
def testNodePortCannotBeChangedByAnotherSteward(looper, txnPoolNodeSet,
                                                tdirWithPoolTxns, tconf,
                                                steward1, stewardWallet,
                                                nodeThetaAdded):
    _, _, newNode = nodeThetaAdded
    nodeNewHa = genHa(1)
    new_port = nodeNewHa.port
    node_ha = txnPoolNodeSet[0].nodeReg[newNode.name]
    cli_ha = txnPoolNodeSet[0].cliNodeReg[newNode.name + CLIENT_STACK_SUFFIX]
    node_data = {
        ALIAS: newNode.name,
        NODE_PORT: new_port,
        NODE_IP: node_ha.host,
        CLIENT_PORT: cli_ha.port,
        CLIENT_IP: cli_ha.host,
    }

    logger.debug('{} changing port to {} {}'.format(newNode, new_port,
                                                    newNode.nodestack.ha.port))
    sendUpdateNode(steward1, stewardWallet, newNode,
                   node_data)

    for node in txnPoolNodeSet:
        waitRejectWithReason(looper, steward1, 'is not a steward of node',
                             node.clientstack.name)
Esempio n. 2
0
def test_node_alias_cannot_be_changed(looper, txnPoolNodeSet, tdirWithPoolTxns,
                                      tconf, nodeThetaAdded):
    """
    The node alias cannot be changed.
    """
    newSteward, newStewardWallet, newNode = nodeThetaAdded
    node_data = {ALIAS: 'foo'}
    sendUpdateNode(newSteward, newStewardWallet, newNode, node_data)
    for node in txnPoolNodeSet:
        waitRejectWithReason(looper, newSteward,
                             'data has conflicts with request data',
                             node.clientstack.name)