Change in ovirt-engine[master]: core: ImportVMFromConfigurationCommandTest @Spy annotation
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: ImportVMFromConfigurationCommandTest @Spy annotation
......................................................................
core: ImportVMFromConfigurationCommandTest @Spy annotation
Spy the command with the @Spy annotation instead of explicitly calling
Mockito.spy. This change has two advantages - first, it's a tad more
elegant, as it saves the duplicate Mockito.spy calls. Second, and more
importantly, it allows injecting the mocked ExternalVmMacsFinder,
MacPoolPerCluster and VmDeviceUtils without an additional boilerplate
code.
Change-Id: Ica69b0e1ce385e7c0ee0b7bdd758edcf94e4fe4b
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVMFromConfigurationCommandTest.java
1 file changed, 8 insertions(+), 22 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64672
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ica69b0e1ce385e7c0ee0b7bdd758edcf94e4fe4b
Gerrit-PatchSet: 11
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: 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, 3 months
Change in ovirt-engine[master]: core: ImportVMFromConfigurationCommandTest mock generics
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: ImportVMFromConfigurationCommandTest mock generics
......................................................................
core: ImportVMFromConfigurationCommandTest mock generics
Use the generic anyListOf and anyMapOf matchers instead of the raw
anyList and anyMap for some additional strictness.
Change-Id: Ic060a7fba6c44d4ef36056660a377cbc3ec11093
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVMFromConfigurationCommandTest.java
1 file changed, 15 insertions(+), 11 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64668
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic060a7fba6c44d4ef36056660a377cbc3ec11093
Gerrit-PatchSet: 11
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, 3 months
Change in ovirt-engine[master]: core: ImportVMFromConfigurationCommandTest map
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: ImportVMFromConfigurationCommandTest map
......................................................................
core: ImportVMFromConfigurationCommandTest map
Use the standard Collections.singletonMap instead of anonymously
overriding HashMap to make the code cleaner and more concise.
Change-Id: Ia38a35f75465342d26a88a0ce2750cb311729275
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVMFromConfigurationCommandTest.java
1 file changed, 4 insertions(+), 6 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64667
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia38a35f75465342d26a88a0ce2750cb311729275
Gerrit-PatchSet: 11
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: 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, 3 months
Change in ovirt-engine[master]: core: ImportVMFromConfigurationCommandTest mocking
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: ImportVMFromConfigurationCommandTest mocking
......................................................................
core: ImportVMFromConfigurationCommandTest mocking
Remove redundant mocking from
ImportVMFromConfigurationCommandTest.
Change-Id: If55a07009aba2195e6cabfc02ab2e8d02ee2445a
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVMFromConfigurationCommandTest.java
1 file changed, 0 insertions(+), 33 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64666
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If55a07009aba2195e6cabfc02ab2e8d02ee2445a
Gerrit-PatchSet: 11
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: 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, 3 months
Change in ovirt-engine[master]: core: RunVmCommandTest: Set instead of spying
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RunVmCommandTest: Set instead of spying
......................................................................
core: RunVmCommandTest: Set instead of spying
Use the conventional setter instead of spying wherever possible.
This approach has three main advantages:
1. It's easier to read and understand and thus, maintain.
2. It's a tad faster
3. It uses actual production code, thus [slightly] increasing the test
coverage.
Change-Id: Ia1fcde6e12eb1b2e9987521e04314066384a25ee
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
2 files changed, 22 insertions(+), 32 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/65190
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1fcde6e12eb1b2e9987521e04314066384a25ee
Gerrit-PatchSet: 3
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: 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, 3 months
Change in ovirt-engine[master]: core: RunVmCommandTest unused mocking
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RunVmCommandTest unused mocking
......................................................................
core: RunVmCommandTest unused mocking
Removed mocking of unused dependencies.
Change-Id: I03811f886084c42272bd30ac1da77c4f23b3b3a5
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
1 file changed, 0 insertions(+), 30 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Martin Betak: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64665
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I03811f886084c42272bd30ac1da77c4f23b3b3a5
Gerrit-PatchSet: 10
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: 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, 3 months
Change in ovirt-engine[master]: core: RunVmCommandTest @Spy annotation
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RunVmCommandTest @Spy annotation
......................................................................
core: RunVmCommandTest @Spy annotation
Spy the command with the @Spy annotation instead of explicitly calling
Mockito.spy. This change has two advantages - first, it's a tad more
elegant, as it saves the duplicate Mockito.spy calls. Second, and more
importantly, it sets the ground for using injected mocks in these tests
in the future.
Change-Id: Iae9ddd68a57ff72508160ae00a26599033dbcca8
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
1 file changed, 5 insertions(+), 20 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Martin Betak: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64664
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae9ddd68a57ff72508160ae00a26599033dbcca8
Gerrit-PatchSet: 10
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: 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, 3 months
Change in ovirt-engine[master]: core: RunVmCommandTest stubbing
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RunVmCommandTest stubbing
......................................................................
core: RunVmCommandTest stubbing
Remove redundant stubbing.
Change-Id: I7a7d66640ecdc599dbc39ee30591e32c7f53e022
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
1 file changed, 1 insertion(+), 5 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Martin Betak: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64663
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7a7d66640ecdc599dbc39ee30591e32c7f53e022
Gerrit-PatchSet: 10
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: 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, 3 months
Change in ovirt-engine[master]: core: RunVmCommandTest mockito initialization
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RunVmCommandTest mockito initialization
......................................................................
core: RunVmCommandTest mockito initialization
Removed redundant initialization of Mockito as the base class,
BaseCommandTest already handles it.
Change-Id: I0fe580cb1c4632327fffbfe48cae81b39bcfa0ea
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
1 file changed, 0 insertions(+), 6 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Martin Betak: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64662
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0fe580cb1c4632327fffbfe48cae81b39bcfa0ea
Gerrit-PatchSet: 10
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: 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, 3 months
Change in ovirt-engine[master]: core: UpdateVmCommandTest stubbing
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: UpdateVmCommandTest stubbing
......................................................................
core: UpdateVmCommandTest stubbing
Removed the [now] redundant stubbing of the command's methods and
replaced them with straight-forward spying, or with nothing where
it's completely redundant.
Change-Id: I4f5ed9d8087c8f676fc34b78d1bbbd88da010bb3
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmCommandTest.java
1 file changed, 2 insertions(+), 11 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64649
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4f5ed9d8087c8f676fc34b78d1bbbd88da010bb3
Gerrit-PatchSet: 10
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: 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, 3 months