Skip to content

Commit

Permalink
- Changes in integration test env variables to use the standard vars.
Browse files Browse the repository at this point in the history
- Make ApiClient env variable support backwards compatible
  • Loading branch information
jmigueprieto committed Jan 6, 2025
1 parent e89d2a2 commit aabce37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/java-client-v4-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
./gradlew -p tests test
env:
CONDUCTOR_SERVER_URL: ${{ secrets.CONDUCTOR_SERVER_URL }}
CONDUCTOR_SERVER_AUTH_KEY: ${{ secrets.CONDUCTOR_SERVER_AUTH_KEY }}
CONDUCTOR_SERVER_AUTH_SECRET: ${{ secrets.CONDUCTOR_SERVER_AUTH_SECRET }}
CONDUCTOR_AUTH_KEY: ${{ secrets.CONDUCTOR_AUTH_KEY }}
CONDUCTOR_AUTH_SECRET: ${{ secrets.CONDUCTOR_AUTH_SECRET }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,17 @@ public ApiClient build() {

protected void applyEnvVariables() {
super.applyEnvVariables();

String conductorAuthKey = System.getenv("CONDUCTOR_AUTH_KEY");
if (conductorAuthKey == null) {
conductorAuthKey = System.getenv("CONDUCTOR_SERVER_AUTH_KEY"); // for backwards compatibility
}

String conductorAuthSecret = System.getenv("CONDUCTOR_AUTH_SECRET");
if (conductorAuthSecret == null) {
conductorAuthSecret = System.getenv("CONDUCTOR_SERVER_AUTH_SECRET"); // for backwards compatibility
}

if (conductorAuthKey != null && conductorAuthSecret != null) {
this.credentials(conductorAuthKey, conductorAuthSecret);
}
Expand Down

0 comments on commit aabce37

Please sign in to comment.