-
Notifications
You must be signed in to change notification settings - Fork 26
Enable notification integrationtest #376
Enable notification integrationtest #376
Conversation
...rc/test/java/com/redhat/parodos/integration/notification/common/NotificationTestBuilder.java
Outdated
Show resolved
Hide resolved
hack/manifests/testing/ingress.yaml
Outdated
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
path: /workflow-service(/|$)(.*) |
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.
Shouldn't this change require also an update or a similar configuration on the UI?
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.
I do not think that it's the good way, then your swaggers configs are out of control, each service should have his own ingress.
hack/manifests/testing/ingress.yaml
Outdated
backend: | ||
service: | ||
name: workflow-service | ||
port: | ||
number: 8080 | ||
- pathType: Prefix | ||
path: /notification-service(/|$)(.*) |
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.
same for this.
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.
You're right!
WDYT?
https://github.com/gciavarrini/backstage-parodos/tree/add-testing-services-paths
See commit rhdhorchestrator/backstage-parodos@main...gciavarrini:backstage-parodos:add-testing-services-paths
( I haven't opened the PR yet, I'd like to have an early feedback)
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.
seems good to me, but requires verification and feedback from parodos-backstage maintainers.
...rc/test/java/com/redhat/parodos/integration/notification/common/NotificationTestBuilder.java
Outdated
Show resolved
Hide resolved
@@ -36,9 +36,9 @@ | |||
*/ | |||
|
|||
@Slf4j | |||
public abstract class SdkUtils { | |||
public abstract class WorkFlowServiceSdkUtils { |
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.
can we go with: WorkFlowServiceUtils
?
sdk is already implied by the package name.
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.
Updated. I also changed the NotificationServiceSdkUtils according to your suggestion.
sdk-utils/src/main/java/com/redhat/parodos/sdkutils/NotificationServiceSdkUtils.java
Outdated
Show resolved
Hide resolved
throws ApiException, MissingRequiredPropertiesException, InterruptedException { | ||
ApiClient apiClient = Configuration.getDefaultApiClient(); | ||
String serverIp = Optional.ofNullable(System.getenv("SERVER_IP")).orElse("localhost"); | ||
String serverPort = Optional.ofNullable(System.getenv("SERVER_PORT")).orElse("8080"); |
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.
Default port 8081
sdk-utils/src/main/java/com/redhat/parodos/sdkutils/NotificationServiceSdkUtils.java
Outdated
Show resolved
Hide resolved
sdk-utils/src/main/java/com/redhat/parodos/sdkutils/NotificationServiceSdkUtils.java
Outdated
Show resolved
Hide resolved
...-tests/src/test/java/com/redhat/parodos/integration/notification/NotificationRecordTest.java
Outdated
Show resolved
Hide resolved
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class NotificationTestBuilder { |
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.
There are duplicates between NotificationTestBuilder
to WorkFlowTestBuilder
Consider to move those duplicates to common parent abstract class
(public class NotificationTestBuilder extends BaseTestBuilder
)
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.
The problem is that the duplicate code relies on objects that seems the same but that belong to different packages (for example com.redhat.parodos.sdkutils.ApiClient and
com.redhat.parodos.sdk.invoker.ApiClient`). Such generated classes don't implement any common interface, so it's difficult to extract an abstract class.
Maybe in another PR we can try to write a wrapper for such sdk generated classes to reduce the code duplication. WDYT?
To reflect changes made in `parodos` PR rhdhorchestrator/parodos#376 When deploying `parodos` locally or in a `Kind` cluster using `kubectl kustomize hack/manifests/testing | kubectl apply -f -` the workflow service and the notification service paths have been changed. Depends on PR rhdhorchestrator/parodos#376 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
39b4ede
to
c2cd035
Compare
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
c2cd035
to
f3ab1e9
Compare
f3ab1e9
to
8e52d8f
Compare
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
8e52d8f
to
4402522
Compare
To reflect changes in PR rhdhorchestrator/parodos#376 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
/lgtm |
There are going to be conflicts with #399 |
To reflect changes in PR rhdhorchestrator/parodos#376 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
To reflect changes in PR rhdhorchestrator/parodos#376 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pkliczewski The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
To reflect changes in PR rhdhorchestrator/parodos#376 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
What this PR does / why we need it:
Enable notification service integration tests.
NotificationRecordTest
has been refactored to match project code style/implementation.In addition to that, it was necessary to fix the test to let it work with the integration tests in CI.
Future PRs will improve the
NotificationRecordTest
implementation.Documentation PRs:
Fixes # FLPATH-348
Change type
Impacted services
Checklist