Change in ovirt-engine[master]: core: UpdateRngDeviceTest spying
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: UpdateRngDeviceTest spying
......................................................................
core: UpdateRngDeviceTest spying
Spy the command instead of stubbing it as per the project's standard.
Although this approach is semantically similar, it saves a lot of code
bloating and sets up the ability to inject mocked DAOs in the following
patches.
Change-Id: I02fe3da9160f9e6ff11ed218a32a9d39489623b5
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateRngDeviceTest.java
1 file changed, 6 insertions(+), 21 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jakub Niedermertl: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64784
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I02fe3da9160f9e6ff11ed218a32a9d39489623b5
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: AbstractRngDeviceCommand#init
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: AbstractRngDeviceCommand#init
......................................................................
core: AbstractRngDeviceCommand#init
Move the initialization logic from the constructor to the init method,
as per the project's standard.
The init() method is called as part of the command construction
framework, and since it's done in the postConstruct phase, it's safe to
use DAO calls there, allowing the test to be cleaned up in the following
patch.
Change-Id: I9e8dfdcc791e7e42f2b01df2a2aec2ef47cbce4d
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractRngDeviceCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateRngDeviceTest.java
2 files changed, 7 insertions(+), 2 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jakub Niedermertl: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64783
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9e8dfdcc791e7e42f2b01df2a2aec2ef47cbce4d
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EditAffinityGroupCommandTest @Spy annotation
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EditAffinityGroupCommandTest @Spy annotation
......................................................................
core: EditAffinityGroupCommandTest @Spy annotation
Spy the command with the @Spy annotation instead of explicitly calling
Mockito.spy in order to use injected mocks instead of explicitly
spying their return.
Note that as the order of execution between @Mock and @Spy can't be
relied upon the parameters objects was converted from a mock to a real
instance. As this object is a simple data-POJO, there is no real reason
to mock it anyway, and doing so just adds complexity to the test.
Change-Id: Ia11e4739a6ca7277fa04b1a21c321d3629fd4cf6
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/commands/EditAffinityGroupCommandTest.java
1 file changed, 7 insertions(+), 6 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Roman Mohr: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64782
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia11e4739a6ca7277fa04b1a21c321d3629fd4cf6
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EditAffinityGroupCommandTest stubbing
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EditAffinityGroupCommandTest stubbing
......................................................................
core: EditAffinityGroupCommandTest stubbing
Removed stubbing and replaced it with easier to read spying, as per
the project's standard.
Change-Id: I1f83191a0c6d2d0f3fdd6f879539807b38d5fc5f
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/commands/EditAffinityGroupCommandTest.java
1 file changed, 5 insertions(+), 9 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Roman Mohr: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64781
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1f83191a0c6d2d0f3fdd6f879539807b38d5fc5f
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: AffinityGroupCRUDCommand#init
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: AffinityGroupCRUDCommand#init
......................................................................
core: AffinityGroupCRUDCommand#init
Move the initialization logic from the command's constructor to the
init() method, as per the project's standard.
This is done in order to move any DAO calls to the postConstruct phase,
where it's safe to use them, and better facilitate testing these
commands.
Change-Id: I7ca5b59817d7b93924814a5c1e848e7afa19e580
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/AffinityGroupCRUDCommand.java
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Roman Mohr: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64780
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ca5b59817d7b93924814a5c1e848e7afa19e580
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EndExternalStepCommandTest @Spy annotation
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EndExternalStepCommandTest @Spy annotation
......................................................................
core: EndExternalStepCommandTest @Spy annotation
Use the @Spy annotation to facilitate injecting mocks to the command
under test in the following patches in the series.
Change-Id: I1019f5c55345aca8a594911de993c61b2817a762
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/EndExternalStepCommandTest.java
1 file changed, 20 insertions(+), 21 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64794
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1019f5c55345aca8a594911de993c61b2817a762
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: Remove EndExternalJobCommandTest#log
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: Remove EndExternalJobCommandTest#log
......................................................................
core: Remove EndExternalJobCommandTest#log
Removed the unused mocked logger.
Change-Id: Ia5c83f511966446a2006191e9aaf5f48b00c0e1a
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/EndExternalJobCommandTest.java
1 file changed, 0 insertions(+), 3 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64793
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5c83f511966446a2006191e9aaf5f48b00c0e1a
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EndExternalJobCommandTest#makeJob
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EndExternalJobCommandTest#makeJob
......................................................................
core: EndExternalJobCommandTest#makeJob
Extracted the makeJob method to avoid duplicating code between
makeExternalTestJob() and makeNonExternalTestJob().
Change-Id: I2800ed48375a13086f961acf33bd751fbcecfc98
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/EndExternalJobCommandTest.java
1 file changed, 7 insertions(+), 4 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64792
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2800ed48375a13086f961acf33bd751fbcecfc98
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EndExternalJobCommandTest @Before annotation
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EndExternalJobCommandTest @Before annotation
......................................................................
core: EndExternalJobCommandTest @Before annotation
Use the @Before annotation to set up the test instead of having to
explicitly call setupMock() in each test case.
Change-Id: I779adbfe6f10ac8a4fd3d5be1607fd4559c49ab8
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/EndExternalJobCommandTest.java
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64791
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I779adbfe6f10ac8a4fd3d5be1607fd4559c49ab8
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months
Change in ovirt-engine[master]: core: EndExternalJobCommandTest @Spy annotation
by tnisan@redhat.com
Tal Nisan has submitted this change and it was merged.
Change subject: core: EndExternalJobCommandTest @Spy annotation
......................................................................
core: EndExternalJobCommandTest @Spy annotation
Rework the test so the command is spied with an annotation and the thing
that changes between the tests is the result the DAO returns for the
constant jobid.
Besides being clearer, this approach sets the scene for injecting the
DAO later on in the patch series.
Change-Id: Ic67b7d8373e5fc451ca2e856cc11543b2dac40ef
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/EndExternalJobCommandTest.java
1 file changed, 13 insertions(+), 21 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/64790
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic67b7d8373e5fc451ca2e856cc11543b2dac40ef
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
8 years, 2 months