Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regression tests #14

Merged
merged 10 commits into from
Feb 7, 2017
Merged

Add regression tests #14

merged 10 commits into from
Feb 7, 2017

Conversation

ayeleta
Copy link

@ayeleta ayeleta commented Feb 3, 2017

Regression tests + unit tests of the Sandbox class


This change is Reviewable

Add regression tests
… add_regression_tests

# Conflicts:
#	SandboxOrchestrationPackage/DataModel/datamodel.xml
#	sandbox_scripts/environment/setup/setup_script.py
@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

Review status: 0 of 17 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 207 at r1 (raw file):

        self.sandbox.clear_all_resources_live_status()
        self.mock_api_session.return_value.SetResourceLiveStatus.assert_called()

check that the api was called twice


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 225 at r1 (raw file):

        self.sandbox.clear_all_resources_live_status()
        self.mock_api_session.return_value.SetResourceLiveStatus.assert_called()
  1. add assert not called for services
  2. check that set live status api called twice

sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 292 at r1 (raw file):

        self.mock_api_session.return_value.GetReservationDetails = Mock(return_value=rdi)
        self.sandbox.activate_connectors(True)
        self.mock_api_session.return_value.ConnectRoutesInReservation.assert_called()

check that this api was called with the second connector (connectionfailed)


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 349 at r1 (raw file):

    #================================================================
    #test activate_routes

update the comment


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 386 at r1 (raw file):

        self.sandbox.get_root_resources = Mock(return_value=rr)
        self.sandbox.power_on_vms()
        self.mock_api_session.return_value.ExecuteResourceConnectedCommand.assert_called_with('5487c6ce-d0b3-43e9-8ee7-e27af8406905', 'r2', 'PowerOn', 'power')

should be r1


Comments from Reviewable

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

Reviewed 16 of 19 files at r1, 1 of 3 files at r2.
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


Comments from Reviewable

@coveralls
Copy link

Coverage Status

Coverage increased (+28.5%) to 28.477% when pulling e7dd887 on add_regression_tests into ba20695 on develop.

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

Reviewed 3 of 3 files at r4.
Review status: all files reviewed at latest revision, 5 unresolved discussions.


Comments from Reviewable

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

Review status: all files reviewed at latest revision, 5 unresolved discussions.


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 207 at r1 (raw file):

Previously, kalsky wrote…

check that the api was called twice

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 225 at r1 (raw file):

Previously, kalsky wrote…
  1. add assert not called for services
  2. check that set live status api called twice

function actually removed. OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 292 at r1 (raw file):

Previously, kalsky wrote…

check that this api was called with the second connector (connectionfailed)

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 349 at r1 (raw file):

Previously, kalsky wrote…

update the comment

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 386 at r1 (raw file):

Previously, kalsky wrote…

should be r1

OK


Comments from Reviewable

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

OK


Review status: all files reviewed at latest revision, 5 unresolved discussions.


Comments from Reviewable

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

Review status: all files reviewed at latest revision, 5 unresolved discussions.


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 225 at r1 (raw file):

Previously, kalsky wrote…

function actually removed. OK

OK


Comments from Reviewable

@kalsky
Copy link
Member

kalsky commented Feb 7, 2017

LGTM


Comments from Reviewable

@ayeleta
Copy link
Author

ayeleta commented Feb 7, 2017

Review status: all files reviewed at latest revision, 5 unresolved discussions.


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 207 at r1 (raw file):

Previously, kalsky wrote…

OK

OK


Comments from Reviewable

@ayeleta
Copy link
Author

ayeleta commented Feb 7, 2017

Review status: all files reviewed at latest revision, 4 unresolved discussions.


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 225 at r1 (raw file):

Previously, kalsky wrote…

OK

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 292 at r1 (raw file):

Previously, kalsky wrote…

OK

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 349 at r1 (raw file):

Previously, kalsky wrote…

OK

OK


sandbox_scripts/QualiEnvironmentUtils/tests/test_Sandbox.py, line 386 at r1 (raw file):

Previously, kalsky wrote…

OK

OK


Comments from Reviewable

@kalsky kalsky merged commit f7f00b1 into develop Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants