Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-test-for-sjad-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- name: Run tests
run: |
cd ./cli/azd
go test $(go list ./... | grep -v github.com/azure/azure-dev/cli/azd/test/functional) -cover
go test $(go list ./... | grep -v github.com/azure/azure-dev/cli/azd/test/functional) -cover -v
15 changes: 13 additions & 2 deletions cli/azd/internal/appdetect/pom_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
package appdetect

import (
"log/slog"
"os"
"os/exec"
"path/filepath"
"reflect"
"strings"
"testing"
)

func TestCreateEffectivePom(t *testing.T) {
if !commandExistsInPath("java") {
t.Skip("Skip TestCreateEffectivePom because java command doesn't exist.")
} else {
path, _ := exec.LookPath("java")
slog.Info("Java command found.", "path", path)
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

tests := []struct {
name string
testPoms []testPom
Expand Down Expand Up @@ -1053,8 +1061,11 @@ func TestAbsorbBuildPlugin(t *testing.T) {
}

func TestCreateSimulatedEffectivePom(t *testing.T) {
if os.Getenv("GITHUB_ACTIONS") == "true" {
t.Skip("Skip TestCreateSimulatedEffectivePom in GitHub Actions because it will time out.")
if !commandExistsInPath("java") {
t.Skip("Skip TestCreateSimulatedEffectivePom because java command doesn't exist.")
} else {
path, _ := exec.LookPath("java")
slog.Info("Java command found.", "path", path)
}
var tests = []struct {
name string
Expand Down