-
Notifications
You must be signed in to change notification settings - Fork 160
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
Restrictable Service Configurations #2947
Merged
lorthirk
merged 1 commit into
eclipse:develop
from
lorthirk:feature-restrictedConfigurations
May 11, 2020
Merged
Restrictable Service Configurations #2947
lorthirk
merged 1 commit into
eclipse:develop
from
lorthirk:feature-restrictedConfigurations
May 11, 2020
+115
−54
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
from
April 23, 2020 09:07
1ae72f2
to
0a10fac
Compare
lorthirk
changed the title
Feature restricted configurations
Restrictable Configurations
Apr 23, 2020
lorthirk
changed the title
Restrictable Configurations
Restrictable Service Configurations
Apr 23, 2020
lorthirk
added
Bug
This is a bug or an unexpected behaviour. Fix it!
Enhancement
This PR/Issue improves an part of Kapua
labels
Apr 23, 2020
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
7 times, most recently
from
April 28, 2020 10:04
7c8c0be
to
7ea89f4
Compare
The issue where a user could change some settings on its own account via REST API is now fixed by #2954. |
Coduz
approved these changes
Apr 28, 2020
lorthirk
added
the
Waitfor/Test
This issue/PR needs tests implementation to be properly resolved
label
Apr 28, 2020
PR goes back to draft to wait for fixes in tests |
LeoNerdoG
pushed a commit
to LeoNerdoG/kapua
that referenced
this pull request
May 5, 2020
With a fix for a certain REST API bug (preventing users to change their account settings) in PR eclipse#2946 and PR eclipse#2954 the unit tests for services (tags, users, jobs, scheduling,...) started to fail. I have fixed this by introducing a mocked account that is used as basis for the service creation. I have already ran PR on my Travis and everything was fine. CodeCov should report 0% increased/decreased coverage, since all the changes made are in the ignored folders. Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com> **Related Issue** This PR fixes problems with unit tests in PR eclipse#2947 and PR eclipse#2954. **Description of the solution adopted:** I have added a mocked AccountService and mocked AccountFactory classes to the existing unit tests, so that the check does not fail. This is achieved with Mockito's "spy" method. The necessary Account methods are injected in the _CucumberWithProeprtiesFor(Service)_ file. @lorthirk can you please look at the solution adopted and see if it's ok? After you merge this PR into develop, just rebase your PRs to develop and the tests should be passing normally. **Screenshots** N/A **Any side note on the changes made** N/A Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com>
LeoNerdoG
pushed a commit
to LeoNerdoG/kapua
that referenced
this pull request
May 5, 2020
With a fix for a certain REST API bug (preventing users to change their account settings) in PR eclipse#2946 and PR eclipse#2954 the unit tests for services (tags, users, jobs, scheduling,...) started to fail. I have fixed this by introducing a mocked account that is used as basis for the service creation. I have already ran PR on my Travis and everything was fine. CodeCov should report 0% increased/decreased coverage, since all the changes made are in the ignored folders. Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com> **Related Issue** This PR fixes problems with unit tests in PR eclipse#2947 and PR eclipse#2954. **Description of the solution adopted:** I have added a mocked AccountService and mocked AccountFactory classes to the existing unit tests, so that the check does not fail. This is achieved with Mockito's "spy" method. The necessary Account methods are injected in the _CucumberWithProeprtiesFor(Service)_ file. @lorthirk can you please look at the solution adopted and see if it's ok? After you merge this PR into develop, just rebase your PRs to develop and the tests should be passing normally. **Screenshots** N/A **Any side note on the changes made** N/A Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com>
LeoNerdoG
pushed a commit
to LeoNerdoG/kapua
that referenced
this pull request
May 5, 2020
With a fix for a certain REST API bug (preventing users to change their account settings) in PR eclipse#2946 and PR eclipse#2954 the unit tests for services (tags, users, jobs, scheduling,...) started to fail. I have fixed this by introducing a mocked account that is used as basis for the service creation. I have already ran PR on my Travis and everything was fine. CodeCov should report 0% increased/decreased coverage, since all the changes made are in the ignored folders. Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com> **Related Issue** This PR fixes problems with unit tests in PR eclipse#2947 and PR eclipse#2954. **Description of the solution adopted:** I have added a mocked AccountService and mocked AccountFactory classes to the existing unit tests, so that the check does not fail. This is achieved with Mockito's "spy" method. The necessary Account methods are injected in the _CucumberWithProeprtiesFor(Service)_ file. @lorthirk can you please look at the solution adopted and see if it's ok? After you merge this PR into develop, just rebase your PRs to develop and the tests should be passing normally. **Screenshots** N/A **Any side note on the changes made** N/A
LeoNerdoG
pushed a commit
to LeoNerdoG/kapua
that referenced
this pull request
May 5, 2020
With a fix for a certain REST API bug (preventing users to change their account settings) in PR eclipse#2946 and PR eclipse#2954 the unit tests for services (tags, users, jobs, scheduling,...) started to fail. I have fixed this by introducing a mocked account that is used as basis for the service creation. I have already ran PR on my Travis and everything was fine. CodeCov should report 0% increased/decreased coverage, since all the changes made are in the ignored folders. Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com> **Related Issue** This PR fixes problems with unit tests in PR eclipse#2947 and PR eclipse#2954. **Description of the solution adopted:** I have added a mocked AccountService and mocked AccountFactory classes to the existing unit tests, so that the check does not fail. This is achieved with Mockito's "spy" method. The necessary Account methods are injected in the _CucumberWithProeprtiesFor(Service)_ file. @lorthirk can you please look at the solution adopted and see if it's ok? After you merge this PR into develop, just rebase your PRs to develop and the tests should be passing normally. **Screenshots** N/A **Any side note on the changes made** N/A
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
4 times, most recently
from
May 6, 2020 14:57
9f811bc
to
3dc32e6
Compare
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
4 times, most recently
from
May 6, 2020 15:45
c7da02e
to
5442520
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2947 +/- ##
=============================================
+ Coverage 56.16% 56.22% +0.06%
+ Complexity 2595 2593 -2
=============================================
Files 1061 1061
Lines 22990 23002 +12
Branches 2065 2064 -1
=============================================
+ Hits 12912 12934 +22
+ Misses 9135 9117 -18
- Partials 943 951 +8 |
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
5 times, most recently
from
May 8, 2020 13:55
dc610b6
to
2f835b2
Compare
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
lorthirk
force-pushed
the
feature-restrictedConfigurations
branch
from
May 11, 2020 10:23
2f835b2
to
82b52df
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
This PR/Issue improves an part of Kapua
Waitfor/Test
This issue/PR needs tests implementation to be properly resolved
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces support for Restrictable Service Configurations. Two methods are introduced in
AbstractKapuaConfigurableService
, meant to be overridden by the extending services:boolean isAvailableService()
: controls whether the whole service is available or notboolean isAvailableProperty(KapuaTad ad)
: controls whether a single property is available or norRelated Issue
No related issues