478 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			478 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from __future__ import unicode_literals | ||
|  | 
 | ||
|  | import boto3 | ||
|  | import sure  # noqa | ||
|  | 
 | ||
|  | from moto import mock_managedblockchain | ||
|  | from . import helpers | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_node(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     # Create network | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     # Create a node | ||
|  |     response = conn.create_node( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ) | ||
|  |     node_id = response["NodeId"] | ||
|  | 
 | ||
|  |     # Find node in full list | ||
|  |     response = conn.list_nodes(NetworkId=network_id, MemberId=member_id) | ||
|  |     nodes = response["Nodes"] | ||
|  |     nodes.should.have.length_of(1) | ||
|  |     helpers.node_id_exist_in_list(nodes, node_id).should.equal(True) | ||
|  | 
 | ||
|  |     # Get node details | ||
|  |     response = conn.get_node(NetworkId=network_id, MemberId=member_id, NodeId=node_id) | ||
|  |     response["Node"]["AvailabilityZone"].should.equal("us-east-1a") | ||
|  | 
 | ||
|  |     # Update node | ||
|  |     logconfignewenabled = not helpers.default_nodeconfiguration[ | ||
|  |         "LogPublishingConfiguration" | ||
|  |     ]["Fabric"]["ChaincodeLogs"]["Cloudwatch"]["Enabled"] | ||
|  |     logconfignew = { | ||
|  |         "Fabric": {"ChaincodeLogs": {"Cloudwatch": {"Enabled": logconfignewenabled}}} | ||
|  |     } | ||
|  |     conn.update_node( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeId=node_id, | ||
|  |         LogPublishingConfiguration=logconfignew, | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Delete node | ||
|  |     conn.delete_node( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeId=node_id, | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Find node in full list | ||
|  |     response = conn.list_nodes(NetworkId=network_id, MemberId=member_id) | ||
|  |     nodes = response["Nodes"] | ||
|  |     nodes.should.have.length_of(1) | ||
|  |     helpers.node_id_exist_in_list(nodes, node_id).should.equal(True) | ||
|  | 
 | ||
|  |     # Find node in full list - only DELETED | ||
|  |     response = conn.list_nodes( | ||
|  |         NetworkId=network_id, MemberId=member_id, Status="DELETED" | ||
|  |     ) | ||
|  |     nodes = response["Nodes"] | ||
|  |     nodes.should.have.length_of(1) | ||
|  |     helpers.node_id_exist_in_list(nodes, node_id).should.equal(True) | ||
|  | 
 | ||
|  |     # But cannot get | ||
|  |     response = conn.get_node.when.called_with( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeId=node_id, | ||
|  |     ).should.throw(Exception, "Node {0} not found".format(node_id)) | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_node_standard_edition(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     frameworkconfiguration = {"Fabric": {"Edition": "STANDARD"}} | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     # Instance type only allowed with standard edition | ||
|  |     logconfigbad = dict(helpers.default_nodeconfiguration) | ||
|  |     logconfigbad["InstanceType"] = "bc.t3.large" | ||
|  |     response = conn.create_node( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeConfiguration=logconfigbad, | ||
|  |     ) | ||
|  |     node_id = response["NodeId"] | ||
|  | 
 | ||
|  |     # Get node details | ||
|  |     response = conn.get_node(NetworkId=network_id, MemberId=member_id, NodeId=node_id) | ||
|  |     response["Node"]["InstanceType"].should.equal("bc.t3.large") | ||
|  | 
 | ||
|  |     # Need another member so the network does not get deleted | ||
|  |     # Create proposal | ||
|  |     response = conn.create_proposal( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         Actions=helpers.default_policy_actions, | ||
|  |     ) | ||
|  |     proposal_id = response["ProposalId"] | ||
|  | 
 | ||
|  |     # Vote yes | ||
|  |     response = conn.vote_on_proposal( | ||
|  |         NetworkId=network_id, | ||
|  |         ProposalId=proposal_id, | ||
|  |         VoterMemberId=member_id, | ||
|  |         Vote="YES", | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Get the invitation | ||
|  |     response = conn.list_invitations() | ||
|  |     invitation_id = response["Invitations"][0]["InvitationId"] | ||
|  | 
 | ||
|  |     # Create the member | ||
|  |     response = conn.create_member( | ||
|  |         InvitationId=invitation_id, | ||
|  |         NetworkId=network_id, | ||
|  |         MemberConfiguration=helpers.create_member_configuration( | ||
|  |             "testmember2", "admin", "Admin12345", False, "Test Member 2" | ||
|  |         ), | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Remove  member 1 - should remove nodes | ||
|  |     conn.delete_member(NetworkId=network_id, MemberId=member_id) | ||
|  | 
 | ||
|  |     # Should now be an exception | ||
|  |     response = conn.list_nodes.when.called_with( | ||
|  |         NetworkId=network_id, MemberId=member_id, | ||
|  |     ).should.throw(Exception, "Member {0} not found".format(member_id)) | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_too_many_nodes(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     # Create network | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     # Create a node | ||
|  |     response = conn.create_node( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Create another node | ||
|  |     response = conn.create_node( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Find node in full list | ||
|  |     response = conn.list_nodes(NetworkId=network_id, MemberId=member_id) | ||
|  |     nodes = response["Nodes"] | ||
|  |     nodes.should.have.length_of(2) | ||
|  | 
 | ||
|  |     # Try to create one too many nodes | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ).should.throw( | ||
|  |         Exception, "Maximum number of nodes exceeded in member {0}".format(member_id), | ||
|  |     ) | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_node_badnetwork(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId="n-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_node_badmember(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  | 
 | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeConfiguration=helpers.default_nodeconfiguration, | ||
|  |     ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_create_node_badnodeconfig(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     # Incorrect instance type | ||
|  |     logconfigbad = dict(helpers.default_nodeconfiguration) | ||
|  |     logconfigbad["InstanceType"] = "foo" | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeConfiguration=logconfigbad, | ||
|  |     ).should.throw(Exception, "Requested instance foo isn't supported.") | ||
|  | 
 | ||
|  |     # Incorrect instance type for edition | ||
|  |     logconfigbad = dict(helpers.default_nodeconfiguration) | ||
|  |     logconfigbad["InstanceType"] = "bc.t3.large" | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeConfiguration=logconfigbad, | ||
|  |     ).should.throw( | ||
|  |         Exception, | ||
|  |         "Instance type bc.t3.large is not supported with STARTER Edition networks", | ||
|  |     ) | ||
|  | 
 | ||
|  |     # Incorrect availability zone | ||
|  |     logconfigbad = dict(helpers.default_nodeconfiguration) | ||
|  |     logconfigbad["AvailabilityZone"] = "us-east-11" | ||
|  |     response = conn.create_node.when.called_with( | ||
|  |         NetworkId=network_id, MemberId=member_id, NodeConfiguration=logconfigbad, | ||
|  |     ).should.throw(Exception, "Availability Zone is not valid") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_list_nodes_badnetwork(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.list_nodes.when.called_with( | ||
|  |         NetworkId="n-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_list_nodes_badmember(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  | 
 | ||
|  |     response = conn.list_nodes.when.called_with( | ||
|  |         NetworkId=network_id, MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_get_node_badnetwork(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.get_node.when.called_with( | ||
|  |         NetworkId="n-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_get_node_badmember(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  | 
 | ||
|  |     response = conn.get_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_get_node_badnode(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     response = conn.get_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Node nd-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_delete_node_badnetwork(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.delete_node.when.called_with( | ||
|  |         NetworkId="n-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_delete_node_badmember(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  | 
 | ||
|  |     response = conn.delete_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_delete_node_badnode(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     response = conn.delete_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |     ).should.throw(Exception, "Node nd-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_update_node_badnetwork(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.update_node.when.called_with( | ||
|  |         NetworkId="n-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         LogPublishingConfiguration=helpers.default_nodeconfiguration[ | ||
|  |             "LogPublishingConfiguration" | ||
|  |         ], | ||
|  |     ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_update_node_badmember(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  | 
 | ||
|  |     response = conn.update_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId="m-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         LogPublishingConfiguration=helpers.default_nodeconfiguration[ | ||
|  |             "LogPublishingConfiguration" | ||
|  |         ], | ||
|  |     ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") | ||
|  | 
 | ||
|  | 
 | ||
|  | @mock_managedblockchain | ||
|  | def test_update_node_badnode(): | ||
|  |     conn = boto3.client("managedblockchain", region_name="us-east-1") | ||
|  | 
 | ||
|  |     response = conn.create_network( | ||
|  |         Name="testnetwork1", | ||
|  |         Description="Test Network 1", | ||
|  |         Framework="HYPERLEDGER_FABRIC", | ||
|  |         FrameworkVersion="1.2", | ||
|  |         FrameworkConfiguration=helpers.default_frameworkconfiguration, | ||
|  |         VotingPolicy=helpers.default_votingpolicy, | ||
|  |         MemberConfiguration=helpers.default_memberconfiguration, | ||
|  |     ) | ||
|  |     network_id = response["NetworkId"] | ||
|  |     member_id = response["MemberId"] | ||
|  | 
 | ||
|  |     response = conn.update_node.when.called_with( | ||
|  |         NetworkId=network_id, | ||
|  |         MemberId=member_id, | ||
|  |         NodeId="nd-ABCDEFGHIJKLMNOP0123456789", | ||
|  |         LogPublishingConfiguration=helpers.default_nodeconfiguration[ | ||
|  |             "LogPublishingConfiguration" | ||
|  |         ], | ||
|  |     ).should.throw(Exception, "Node nd-ABCDEFGHIJKLMNOP0123456789 not found") |