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

Add environment variable injection for SOAP and WSDL endpoints #55

Merged
merged 56 commits into from
Sep 25, 2022

Conversation

n-jay
Copy link
Member

@n-jay n-jay commented Feb 13, 2022

Purpose

Add environment variable injection capability to SOAP and WSDL endpoints.

Approach

Amended AddressEndpointFactory & WSDLEndpointFactory classes to extract environment variables via System.getenv() based on $SYSTEM prefix presence in the Synapse config XML uri elements.

Automation Tests

  • Unit tests
    Covers code written in AddressEndpointFactory.

  • Integration tests
    N/A

Test environment

  • Java version 1.8.0_141
  • Ubuntu 20.04

Learning

A medium post describing the context of the project is linked here.

This is to unit test environment variable extraction during build time.
Used to mock environment variable injection setting during build-time
Delete external library inclusions & add environment variables via surefire
Code to be verified in PR
To check unit tests during build time
extractedEnvVariableValue);
endpointDefinition.setAddress(extractedEnvVariableValue);
} else {
endpointDefinition.setAddress(extractedAddress);
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove the no. of variables and remove the else condition

Copy link
Member Author

@n-jay n-jay May 3, 2022

Choose a reason for hiding this comment

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

commit: 8e51818

@n-jay
Copy link
Member Author

n-jay commented Apr 25, 2022

Code review conducted. Changes requested:

  • Add system prefix constant to SynapseConstants file.
  • Add singular method to DefaultEndpointFactory and call it from the extended class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants