Skip to content

Commit

Permalink
Fix windows encoding issues (opensearch-project#2206) (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#2218)

Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <[email protected]>
(cherry picked from commit a040b86)
  • Loading branch information
peternied authored and stephen-crawford committed Nov 10, 2022
1 parent 3827a13 commit 60a5b5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
-x spotlessCheck
-x checkstyleMain
-x checkstyleTest
-x spotbugsMain
- name: Coverage
uses: codecov/codecov-action@v1
Expand Down
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ plugins {
id 'checkstyle'
id 'nebula.ospackage' version "8.3.0"
id "org.gradle.test-retry" version "1.3.1"
id "com.github.spotbugs" version "5.0.13"
}

allprojects {
Expand All @@ -72,6 +73,14 @@ spotless {
}
}

spotbugs {
includeFilter = file('spotbugs-include.xml')
}

spotbugsTest {
enabled = false
}

java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/opensearch/security/IntegrationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.hc.core5.http.message.BasicHeader;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;

import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest;
Expand Down Expand Up @@ -270,7 +269,6 @@ public void testSingle() throws Exception {
}

@Test
@Ignore // https://github.com/opensearch-project/security/issues/2194
public void testSpecialUsernames() throws Exception {

setup();
Expand Down

0 comments on commit 60a5b5b

Please sign in to comment.