diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index dad26ddc..0ae7d495 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -35,6 +35,12 @@ jobs: distribution: temurin java-version: '17' + - name: Prepare frontend embed + shell: bash + run: | + mkdir -p frontend/dist + printf 'GoNavi test\n' > frontend/dist/index.html + - name: Run backend tests run: go test ./... -count=1 -timeout=30m diff --git a/internal/jvm/agent_provider_test.go b/internal/jvm/agent_provider_test.go index 4261e1e0..567ffa16 100644 --- a/internal/jvm/agent_provider_test.go +++ b/internal/jvm/agent_provider_test.go @@ -244,7 +244,8 @@ func startAgentFixture(t *testing.T) agentFixtureProcess { t.Fatalf("expected agent fixture java files under %s", sourceRoot) } - compileCmd := exec.Command(javacBin, append([]string{"-d", classesDir}, javaFiles...)...) + compileArgs := append([]string{"-encoding", "UTF-8", "-d", classesDir}, javaFiles...) + compileCmd := exec.Command(javacBin, compileArgs...) output, err := compileCmd.CombinedOutput() if err != nil { t.Fatalf("compile agent fixture failed: %v\n%s", err, strings.TrimSpace(string(output))) diff --git a/internal/jvm/http_provider_test.go b/internal/jvm/http_provider_test.go index 4246741a..c89b8b08 100644 --- a/internal/jvm/http_provider_test.go +++ b/internal/jvm/http_provider_test.go @@ -534,7 +534,8 @@ func startEndpointFixture(t *testing.T) endpointFixtureProcess { t.Fatalf("expected endpoint fixture java files under %s", sourceRoot) } - compileCmd := exec.Command(javacBin, append([]string{"-d", classesDir}, javaFiles...)...) + compileArgs := append([]string{"-encoding", "UTF-8", "-d", classesDir}, javaFiles...) + compileCmd := exec.Command(javacBin, compileArgs...) output, err := compileCmd.CombinedOutput() if err != nil { t.Fatalf("compile endpoint fixture failed: %v\n%s", err, strings.TrimSpace(string(output))) diff --git a/internal/jvm/jmx_provider_test.go b/internal/jvm/jmx_provider_test.go index e9b574d7..ea407aa4 100644 --- a/internal/jvm/jmx_provider_test.go +++ b/internal/jvm/jmx_provider_test.go @@ -788,7 +788,8 @@ func startJMXFixture(t *testing.T) jmxFixtureProcess { t.Fatalf("expected fixture java files under %s", sourceRoot) } - compileCmd := exec.Command(javacBin, append([]string{"-d", classesDir}, javaFiles...)...) + compileArgs := append([]string{"-encoding", "UTF-8", "-d", classesDir}, javaFiles...) + compileCmd := exec.Command(javacBin, compileArgs...) output, err := compileCmd.CombinedOutput() if err != nil { t.Fatalf("compile fixture failed: %v\n%s", err, strings.TrimSpace(string(output)))