Commit Graph

699 Commits

Author SHA1 Message Date
Anand Kumar
39ccf65f2e Feature target with target type in UI (#1178)
* Added the target type combo box to add or update Target in UI

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed NPE for empty target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type option to target bulk upload

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target type filter

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Named entity mapper for target type UI

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed sonar issues for serialization

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Bulk upload target type combo box

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-10-11 15:00:16 +02:00
Natalia Kislicyn
70d0fe879e Feature mass cancel running actions on ds invalidation (#1177)
* Extend DS invalidation dialog to include mass-cancellation of actions

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

add component id for cancelation type radio buttons

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add infos about ds invalidation to UI documentation;
update UI images; add screenshot about ds invalidation

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add link property to invalidation docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Put invalidation counts into one object

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add hint to invalidation dialog, that invalidation is unrepeatable

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* disable invalidate button if insufficient permission

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix auto assignment error with insufficient permission

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* implement permissions check for invalidation dialog

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add update_target permission to api doc description

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-10-05 14:15:43 +02:00
Sebastian Firsching
825cb64448 Introduce basic functionality for invalidation of distributionsets (#1179)
* Basic DS invalidation functionality

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add checks for valid/complete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Stop rollouts + auto assignments when invalidating a DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add methods to count AAs + rollouts for invalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Small refactoring for DS management

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidation functionality to REST API

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix update stopped rollouts status

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add various tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Introduce countActionsForInvalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix event tests with incomplete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add H2 migration script

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix action count method

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix REST documentation tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Change flyway version number

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add lock for DS invalidation + adapt tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move concurrency test to own class

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Handle possible InterruptedException

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix concurrency test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Use one transaction for all invalidations

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidate endpoint to REST docu

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Execute invalidation in transaction when actions are cancelled

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Check that distribution set is valid when editing/creating metadata

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Remove all changes in UI

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add DB migration files for all databases

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Implement review findings

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move DS invalidation to own class to check permissions for single steps

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move invalidation count methods to management classes

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix failing tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
2021-09-30 15:26:36 +02:00
Natalia Kislicyn
b5fcb48ab1 Colour property in Mgmt API response for DS/SM type (#1174)
* Update name SP to hawkbit in api guide adocs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix javadoc class descriptions of existing resource/api classes

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to api response of ds/sw type

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to sw type test data & adapt rest docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add missing property description for "colour" and "deleted"

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-09-02 10:09:17 +02:00
Bondar Bogdan
42b1fc9439 fix null pointer exception in rsql target field validation test (#1172)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-30 20:17:52 +02:00
Bondar Bogdan
87199937c4 Dependency upgrades (#1170)
* Increase jsoup version

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* bumped vaadin/guava/common-io to newest versions

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* substituted deprecated guava create temp dir method

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-30 15:39:23 +02:00
Bondar Bogdan
20388e48f8 Fix sonar/repository for target type (#1169)
* fix sonar/repository for target type changes

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* review finding

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-25 14:43:10 +02:00
Anand Kumar
3fa1dd1be4 Feature target type entity (#1162)
* Added Target Type model

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type JPA model

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type repository model classes

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the name entity from Target Type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Refactored the Target Type models

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added the DB migration script and updated the Target Type models

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type in target Mapper

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Changed the target type ID to Long

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added MYSQL DB migration script and removed the deleted column for target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Updated the DB migration script for target table

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added manyToMany reltation between target type and Ds type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added POSTGRESQL DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added MSSQL SERVER DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added DB2 DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing license header and java docs

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added on delete cascade in DB migration script

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target Type specification

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the delete cascade and Added type API
Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* fixed API doc build

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type management test

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type events test

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type update and unassign to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added API tests for assigning target type to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing license header

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added missing docs

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed sonar issues

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed license header build issue

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Updated the attribute name to target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed unused error status variable

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target API to assign target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added the tests for assigning target type to target

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the review comments for null check

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-08-25 12:13:27 +02:00
Robert Sing
2574581b2c Feature/enforce hash validation for uploads (#1158)
* moved artifact duplication check after hash check

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added unit tests

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed copyright header

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review finding

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-08-05 14:53:36 +02:00
Alexander Dobler
101401a6a8 Align target queries to only use specifications (#1148)
* Add additional specifications to cover use cases of queries

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Replace reading target queries by spec, use empty spec in default repo calls

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Use correct NonNull annotation

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Added default exists based on spec count to TargetRepository

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
2021-08-04 17:47:23 +02:00
Alexander Dobler
8c0bd2ffd2 Replace NoCountPagingRepository by interface with dedicated findAllWithoutCount (#1146)
* Replace NoCountPagingRepository by enhanced BaseRepository

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Add missed withoutcount call in distributionsettype find all

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Add missing overrides to NoCountRepository implementation

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Remove need of repository by referencing base class directly in configuration

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
2021-08-04 17:46:31 +02:00
Bondar Bogdan
98535c96b4 Optional controller attributes for THING_CREATED (#1154)
* added optional attributes payload to THING_CREATED DMF message

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added optional attributes unit test for THING_CREATED message handler

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* extended Target interface with getControllerAttributes method, extended DMF message handler integration tests

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* updated hawkbit docs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed review findings

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-02 17:45:48 +02:00
Stefan Behl
1a285849e6 Make RSQL visitor pluggable via a managed bean (#1145)
* Add a managed bean for a RsqlVisitorFactory

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Fix failing unit tests

* Fix Sonar findings

* Fix PR review findings
2021-07-22 09:41:06 +02:00
Stefan Behl
a8f7f50cf9 Support case-insensitive RSQL expressions /target filters (#1137)
* Interpret /parse RSQL expressions case insensitive

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Add unit test verifying that RSQL expressions are case insensitive

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
2021-07-05 18:05:10 +02:00
Michael Herdt
2bdab157cf Publish target assign event (#1136)
* Throw the TargetAssignDistributionSetEvent even if there are actions in CANCELING state present. Filter the actions on the receiver side. In this case at the DMF.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix deploymentManagementTest

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Add debug logs and fix tests to verify correct DMF message behaviour

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Extend test case for the DMF in case the cancel is confirmed by the device

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Remove unsued import

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix review findings by filtering the list of targets first before querying the database for distribution set and software module.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* flip list verification logic

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Refactor amqp tests

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2021-07-02 19:50:04 +02:00
Stefan Behl
2af4e850b8 Consider Target Fields when validating RSQL filters (#1121)
* Removed unnecessary DB queries when editing/validating RSQL query in Target Filter Management (#1023)

Added valid TargetFields to RSQL validation when editing Target Filter.

Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>

* Corrected visit OrNode implementation.

Changed isValid to receive FieldNameProvider as parameter

Reduced code duplication by moving commonly used utility methods to AbstractFieldNameRSQLVisitor from ValidationRSQLVisitor abd JpqQueryRSQLVisitor

Refactored and extended Unit Tests.

Minor corrections and typos.

Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>

* Added Maven entry for devolo 2020 copyright header.

Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>

* Fix failing unit tests

* # WARNING: head commit changed in the meantime

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Fix Sonar findings.

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Cleanup

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Fix PR review findings

* Fix invalid queries in unit tests

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Added test case to create filter with invalid query via Mgmt REST API

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

Co-authored-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
2021-07-02 09:25:12 +02:00
Bondar Bogdan
40b28e212d Injectable UI target data suppliers (#1123)
* initial proposal for injectible target data provider

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* improved selection of first entity in grid

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* introduced constructor to explicitely set DataCommunicator for a Grid

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* made data communicator for target grid injectable

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* adapted size page request to load only one entity for getting total elements, fixed grid duplicates in case lastModified property is the same for targets and rollouts

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* DeleteSupport rethrows the exception to be intercepted by error handlers

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* minor grid refactoring

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* adapted docu for base data providers

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added custom filter data provider, made filter effectively immutable by cloning before data refresh

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* grid returns size directly from data provider instead of data communicator

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* restructured data provider/communicator dependency injection, added injectable data supplier for target filter view grid

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* do not remove confirmation dialog window from UI explicitely

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed sonar, added docs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-06-02 16:58:35 +02:00
Florian Ruschbaschan
f1fb334fed Fix test name in order to get executed by surefire (#1117)
* Fix test name in order to get executed by surefire

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Fix expected group amount for outer query

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-05-20 11:00:25 +02:00
Ahmed Sayed
8f8cfeb53a Simplified JpaRolloutManagement, moved rollout handling logic to JpaRolloutHandler (#1094)
* introduce RolloutExecutor
* removed unused method

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>
2021-05-20 07:41:55 +02:00
Michael Herdt
21a4ae3cb8 Refactor AutoAssignExecutor to improve the extensibility (#1110)
* Refactor AutoAssignExecutor to improve the extensibility.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* introduce protected getters

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Refactor auto assign executor. Create deployment requests based on list of controllerIds.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix review findings

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Surround consumer with a try catch block to continue assignment process for other filter. Execute assignment in user context.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2021-04-26 16:15:20 +02:00
Stefan Behl
cf67467fb5 Execute rollouts and auto assignments in the correct user context (#1100)
* Execute rollouts and auto assignments in correct user context

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>

* Cleanup usage of lenient

Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
2021-04-15 12:23:14 +02:00
Michael Herdt
732e8cc746 Use TargetManagement for the quota related count operation when activating auto assignment instead of performing this operation directly on the repository. (#1108)
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2021-04-07 14:11:38 +02:00
Stefan Klotz
78d784f3c4 Fix error for downloading soft deleted artifact binary (#1102)
* download soft deleted artifact throws binary gone exception

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* add test and update documentation

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix javadoc

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* test soft deleted artifact has no download link

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
2021-03-24 15:17:34 +01:00
Florian Ruschbaschan
41922b6dca Feature/remove junit5 leftovers (#1097)
* Migrate JUnit4 leftovers to JUnit5

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Fix method name typos

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Avoid unnecessary Mockito stubbings

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Replace assertThrows by assertThatExceptionOfType, fix test TODO

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-03-22 10:37:31 +01:00
Michael Herdt
84740a2b1c Introduce new tenant configuration events (#1059)
* Introduce new events that are triggered when changes are made to the tenant configuration.
* Add new events to EventTypes
* Fix DeploymentManagement tests.
* Fix AmqpMessageDispatcherServiceIntegration tests.
* Fix DdiRootControlle test.
* Remove unused imports.
* TenantConfigUpdatedEvent should implement EntityUpdatedEvent

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2021-03-19 11:00:59 +01:00
Michael Herdt
10e69de838 Fix the creation of the Usage Report (#1101)
* Use the forEachTenant method to generate the report for each tenant.
* add a test to verify the functionality of getSystemUsageStatisticsWithTenants

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2021-03-18 11:25:21 +01:00
Dominic Schabel
81defa10a6 Migration to JUnit5 as default test runtime (#1082)
* Migrate tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* REST docs tests migrated to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Migrated security and UI tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Migrated management tests to JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Reflecting changes from JUnit5 migration

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Fix RabbitMQ test detection

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Drop support for JUnit4

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
2021-03-15 13:40:40 +01:00
Dominic Schabel
9c5360e59d JUnit5 support (#1063)
* First preparation for JUnit5

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>

* Exclusion of JUnit5 removed

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
2021-02-12 08:22:26 +01:00
Dominic Schabel
17cca56a1b Merge pull request #1018 from bosch-io/fix_migration_to_new_spring_boot_version
Update Spring Boot to 2.3.7.RELEASE
2021-02-11 16:42:14 +01:00
Stefan Klotz
ba2b3a6427 Fix database migration scripts (#1061)
* fix sql server migration

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix postgres migration

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix db2 migration

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
2021-02-08 10:17:45 +01:00
Ammar Bikic
ac8c174b2c Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2021-01-15 17:28:49 +01:00
Dominic Schabel
ba81ae6fb4 Fix introduced issues
Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
2021-01-14 13:44:22 +01:00
Kai Zimmermann
e9f11d2a20 DB and RabbitMQ integration tests and PostgreSQL testing/bug fixing (#1047)
* Initial matrixSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* License header

* MySQL DB testSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Create matrix for DBsSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* RabbitMQ and H2Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* MySQL 8.0Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Postgresql test supportSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Postgresql test supportSigned-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix DB issues post and mssql

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Wait MSSQL

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix postgresql tests.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* MSSQL startup fix.Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Fix syntax error

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Further fix postgres tests.Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Revert unnecessary changes.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Add SonarCloud Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>

* Simplify devcontainer. Test JDK 15Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>
2021-01-14 09:07:03 +01:00
Florian Ruschbaschan
8816396d18 Add existsByInstalledOrAssignedDistributionSet (#1064)
Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-01-12 11:29:48 +01:00
Ammar Bikic
458bc8cb03 Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-12-04 13:40:31 +01:00
Markus Block
cb2b2ca4e8 Increase cronutils version (#1053)
* CVE-2020-26238

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* adapted code to new cron-utils versions

Signed-off-by: Markus Block <markus.block@bosch-si.com>
2020-11-27 12:19:49 +01:00
Ammar Bikic
68e4cd93e1 Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-11-09 16:13:10 +01:00
Ammar Bikic
165f6e0435 Change to proper versioning
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-11-03 09:59:21 +01:00
Dominic Schabel
ed9a4b1bb3 Java 11 support for hawkBit (#1038)
* hawkBit on Java 11
* Reference to created GH issue added

Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
2020-10-29 16:36:55 +01:00
Sergey Gerasimov
929f09a0c1 Removed misleading code from RSQLUtility - unused operator '=li=' (#1030)
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
2020-10-28 17:56:47 +01:00
Ammar Bikic
2e224b0ffd Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-23 13:32:42 +02:00
Bondar Bogdan
c6bec4c97e fixed overriding deprecated method on no count repository (#1032)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2020-10-20 09:30:04 +02:00
Ammar Bikic
bd382c3725 Adaptations due to PR comments
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-15 11:45:08 +02:00
Sergey Gerasimov
99c8725b70 Create index on "last_modified_at" column in "sp_target" table. (#1015)
* Create index on "last_modified_at" column in "sp_target" table.
* Added tenant to the index.

Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
2020-10-13 17:06:43 +02:00
Bondar Bogdan
541a0129ef UI Spring Context Holder bean registration (#1026)
* register the Spring Context Holder bean for UI instead of setting the context for each UI separately
* reverted test scope for db driver

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2020-10-13 17:04:18 +02:00
Ammar Bikic
ddabbc5249 Replace MediaTypes and make use of proper Identifiable.class
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-05 05:11:48 +02:00
Ammar Bikic
c17ba89c6c Use best practise annotation for SAM interfaces in Java 8
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-02 18:17:30 +02:00
Ammar Bikic
8e90ffd95e Adaptations due to Vaadin 8 merge
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-02 18:17:04 +02:00
Ammar Bikic
28b65a290d Update Spring Boot to 2.3.2
-Update Spring Cloud to Hoxton.SR7
-Replace ResourceSupport by RepresentationModel (Spring Hateoas 1.0)
-Replace ControllerLinkBuilder by WebMvcLinkBuilder (Spring Hateoas 1.0)
-Move getId() from Identifiable to BaseEntity (Spring Hateoas 1.0)
-Remove hamcrest.Factory
-Use static Sort.by reference
-Place http security anyRequest().authenticated()
-Replace MockMvcRequestBuilders.fileUpload by MockMvcRequestBuilders.multipart
-Deprecate MEDIA_TYPE_CBOR_UTF8
-Replace MEDIA_TYPE_CBOR_UTF8 by MEDIA_TYPE_CBOR in tests
-Replace HAL_JSON_UTF8 by HAL_JSON in tests
-Replace APPLICATION_JSON_UTF8 by APPLICATION_JSON in tests
-Use org.mockito.junit.MockitoJUnitRunner
-Remove overridden dependency versions
-Removing not needed comments in pom.xml
-Downgrade flyway-core to be MySQL 5.6 compatible
-Add maven-site-plugin since it was removed with spring-boot 2.3
-Set servlet encoding properties
-Introducing Test that verifies the charset inside the content-type of a response
-Add @DirtiesContext to CorsTest and ContentTypeTest
-Add content-type mockmvc test with adapted mockmvc config
-Move encoding.force property to test class
-Switch expected and actual parameter values in content-type test
-Delete deprecated content-type test with TestRestTemplate
-Exclude JUnit5 from spring-boot-starter-test
-Upgrade allure-junit4 to 2.13.5
-Add aspectjweaver 1.9.6 to surefire test execution
-Add flyway-core version to property
-Use getRequiredLink() within MgmtBaseEntity.getId()

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
2020-10-02 18:11:18 +02:00
Ahmed Sayed
ba96c68eb0 added triggeredBy for rollouts and autoassignment (#1017)
* added triggeredBy for rollouts and autoassignment

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* use createdBy as fallback for triggeredBy in AutoAssignChecker

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* removed 'NOT NULL' from db migration scripts for JpaTargetFilterQuery

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* inlined redundant method in JpaDeploymentManagement

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* added tests + renamed property to 'initiatedBy'

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
2020-09-28 09:35:19 +02:00