AssertionError

Error code InternalError != ['OperationNotPermitted'] search by Google

args : tuple
("Error code InternalError != ['OperationNotPermitted']",)

Traceback

  1. /usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments )

    self : _Outcome
    <unittest.case._Outcome object at 0x7fb039d352d0>
    test_case : ReservedInstanceOperations
    test_detach_network_interface_negative (c2tests.ec2.reservedinstanceoperations.ReservedInstanceOperations)
    isTest : bool
    True
    1. @contextlib.contextmanager
    2. def testPartExecutor(self, test_case, isTest=False):
    3. old_success = self.success
    4. self.success = True
    5. try:
    6. yield
    7. except KeyboardInterrupt:
    8. raise
    9. except SkipTest as e:
    10. self.success = False

    Locals

    exc_info : NoneType
    None
    old_success : bool
    True

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  2. /usr/local/lib/python3.7/unittest/case.py in run (arguments )

    self : ReservedInstanceOperations
    test_detach_network_interface_negative (c2tests.ec2.reservedinstanceoperations.ReservedInstanceOperations)
    result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    1. with outcome.testPartExecutor(self):
    2. self.setUp()
    3. if outcome.success:
    4. outcome.expecting_failure = expecting_failure
    5. with outcome.testPartExecutor(self, isTest=True):
    6. testMethod()
    7. outcome.expecting_failure = False
    8. with outcome.testPartExecutor(self):
    9. self.tearDown()

    Locals

    expecting_failure : bool
    False
    expecting_failure_class : bool
    False
    expecting_failure_method : bool
    False
    orig_result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    outcome : _Outcome
    <unittest.case._Outcome object at 0x7fb039d352d0>
    testMethod : method
    <bound method _InstanceOperations.test_detach_network_interface_negative of <c2tests.ec2.reservedinstanceoperations.ReservedInstanceOperations testMethod=test_detach_network_interface_negative>>

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  3. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/instanceoperations.py in test_detach_network_interface_negative (arguments )

    self : ReservedInstanceOperations
    test_detach_network_interface_negative (c2tests.ec2.reservedinstanceoperations.ReservedInstanceOperations)
    1. self.assert_error("InvalidParameterValue", interface.delete)
    2. self.assertTrue(instance.interfaces[0].subnet_id)
    3. self.assert_error("OperationNotPermitted",
    4. self.vpcconn.detach_network_interface,
    5. instance.interfaces[0].attachment.id)
    6. # NOTE: Interface 'eni-' is already in use.
    7. self.assert_error("InvalidParameterValue",
    8. interface.attach, instance2.id, 1)

    Locals

    instance : Instance
    Instance:i-30D13F60
    instance2 : Instance
    Instance:i-BD0B4320
    interface : NetworkInterface
    NetworkInterface:eni-48770680
    switch : VirtualSwitch
    VirtualSwitch:Test switch fca16351-e6ad-468c-839a-20cd3522b470

    Globals

  4. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in assert_error (arguments )

    self : ReservedInstanceOperations
    test_detach_network_interface_negative (c2tests.ec2.reservedinstanceoperations.ReservedInstanceOperations)
    error_codes : list
    ['OperationNotPermitted']
    func : method
    <bound method EC2Connection.detach_network_interface of VPCConnection:api.dev.c2.croc.ru>
    *args : tuple
    ('eni-attach-598102A0',)
    **kwargs : dict
    {}
    1. if error_code in error_codes:
    2. return
    3. else:
    4. raise self.failureException(
    5. "Error code {0} != {1}".format(error_code, error_codes)
    6. )
    7. except exceptions.EC2Error as e:
    8. if e.code in error_codes:
    9. return

    Locals

    error_code : str
    InternalError

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7fb043b6ef90>

Environment

Time of report generation
2024-04-19 23:14:17
Python version
3.7.9 (default, Sep 21 2022, 19:11:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Path to executable
/root/c2tests/.venv/bin/python
Working directory
/root/c2tests
Arguments vector
  1. /root/c2tests/.venv/bin/c2tests
  2. run
  3. -s
  4. ec2