Skip to content
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

[PHEE-684] Reporting CRUD APIs Integration Test #296

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -210,7 +210,7 @@ jobs:
name: Test execution
no_output_timeout: 30m
command: |
ngrok config add-authtoken $AUTH_TOKEN
ngrok config add-authtoken 2i8JgHJji5KPQvUpByBDrQ6pfRl_Je6B9jDwHDUadvvvZvGe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be careful while raising PRs to not push changes done for local testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there is only one ngnox in openci so if someone else run there pipeline mine will not work that's why used this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are ngnox and openci, never heard of them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be merged? If not, and you made the change for testing purposes, then the PR is not in the ready for review (RPR) state. It should have been a draft PR and moved to ready for review only after reversing this change.

echo "web_addr: $LOCAL_PORT" >> /home/circleci/.config/ngrok/ngrok.yml
ngrok http 53013 > /dev/null &
echo -n "Extracting ngrok public url ."
Original file line number Diff line number Diff line change
@@ -62,6 +62,18 @@ public class OperationsAppConfig {

public String authUrl;

@Value("${operations-app.endpoints.reportEndpoint}")
public String reportEndpoint;

@Value("${operations-app.endpoints.reportCreate}")
public String reportCreate;

@Value("${operations-app.endpoints.reportUpdate}")
public String reportUpdate;

@Value("${operations-app.endpoints.reportSingleReport}")
public String reportSingleReport;

@PostConstruct
private void setup() {
batchTransactionUrl = operationAppContactPoint + batchTransactionEndpoint;
Original file line number Diff line number Diff line change
@@ -4,10 +4,12 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@EnableConfigurationProperties
@ConfigurationProperties(prefix = "tenantconfig")
@Component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need Component annotation here.

public class TenantConfig {

public void setTenants(HashMap<String, String> tenants) {
4 changes: 4 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,10 @@ operations-app:
variables: "/api/v1/variables"
transactionRequests: "/api/v1/transactionRequests"
actuator: "/actuator/health"
reportEndpoint: "/reports"
reportCreate : "/reports"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why multiple configurations for the same values? 1 or 2 configurations would have sufficed here instead of 4.

reportUpdate : "/reports/{id}"
reportSingleReport: "/reports/{id}"

paybill:
mpesa-connector:
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.mifos.integrationtest.common.dto.operationsapp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor

public class ReportParameter {

private Long id;

private ReportRequestDTO reportRequest;

private String parameterKey;

private String parameterValue;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.mifos.integrationtest.common.dto.operationsapp;

import java.util.List;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ReportRequestDTO {

private Long id;

private String reportName;

private String reportType;

private String reportSubType;

private String reportCategory;

private String description;

private String reportSql;

private List<ReportParameter> reportParameters;
}
Loading