Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed May 13, 2022
1 parent 80714f2 commit 90d9c07
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,12 @@ public Set<JdbcPrivilegeDto> getPrivilegesTableForCurrentUser(final JdbcDatabase
.collect(toSet());
}

@VisibleForTesting
static String getUsername(final JsonNode databaseConfig) {
final String host = databaseConfig.get("host").asText();
final String host = databaseConfig.get("host") == null
// host can be null in test
? ""
: databaseConfig.get("host").asText();
final String username = databaseConfig.get("username").asText();

// Azure Postgres server has this username pattern: <username>@<host>.
Expand Down

1 comment on commit 90d9c07

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

SonarQube Report

SonarQube report for Airbyte Connectors Source Postgres Strict Encrypt(#12834)

Measures

Name Value Name Value Name Value
Duplicated Blocks 0 Lines of Code 27 Security Rating A
Quality Gate Status OK Vulnerabilities 0 Code Smells 0
Reliability Rating A Duplicated Lines (%) 0.0 Bugs 0
Coverage 54.5 Lines to Cover 11 Blocker Issues 0
Critical Issues 0 Major Issues 0 Minor Issues 0

Coverage (54.5%)

File Coverage File Coverage
src/main/java/io/airbyte/integrations/source/postgres/PostgresSourceStrictEncrypt.java 54.5

Please sign in to comment.