-
Notifications
You must be signed in to change notification settings - Fork 4
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 capability of assessing the impact of set of services on given env #95
Conversation
@@ -36,9 +46,40 @@ public JudgeD(EnvironmentRepository environmentRepository, ServiceContractsRepos | |||
return getValidatorResult(validatedService, environmentContracts, validator); | |||
} | |||
|
|||
public <C, E> Map<ServiceVersion, EnvironmentValidatorResult> validatedServicesAgainstEnvironment( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better method name
.collect(toList()); | ||
|
||
// replace environment contracts with validated ones | ||
validatedContracts.forEach(validatedContract -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be validated
@@ -36,9 +46,40 @@ public JudgeD(EnvironmentRepository environmentRepository, ServiceContractsRepos | |||
return getValidatorResult(validatedService, environmentContracts, validator); | |||
} | |||
|
|||
public <C, E> Map<ServiceVersion, EnvironmentValidatorResult> validatedServicesAgainstEnvironment( | |||
List<ServiceContracts> validatedContracts, | |||
String env, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we forfeit possiblity of testing external environments. I think that batch should allow to include external environment (i.e. multiple environments) like in another endpoint (above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do it in another iteration.
@@ -25,7 +31,11 @@ public JudgeD(EnvironmentRepository environmentRepository, ServiceContractsRepos | |||
this.serviceContractsRepository = serviceContractsRepository; | |||
} | |||
|
|||
public <C, E> EnvironmentValidatorResult validateServiceAgainstEnvironments(ServiceContracts validatedService, List<String> environments, InterfaceContractValidator<C, E> validator) { | |||
public <C, E> EnvironmentValidatorResult validateServiceAgainstEnvironments( | |||
ServiceContracts validatedService, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be validated
import org.springframework.web.bind.annotation.ResponseStatus; | ||
|
||
@ResponseStatus(value = HttpStatus.BAD_REQUEST) | ||
public class RequestValidationException extends RuntimeException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use it in another endpoints to remain consistent
import org.springframework.http.MediaType | ||
import spock.lang.Specification | ||
|
||
import static dev.hltech.dredd.domain.contracts.ServiceContracts.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wildcard...
Please add all last changes to readme so that it is clear what we can do in Judged |
Pull Request Test Coverage Report for Build 368
💛 - Coveralls |
No description provided.