Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace imports with fork specific paths to allow this fork to be publishable #3

Merged
merged 2 commits into from
Aug 20, 2024
Merged
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Bug reports

- Before reporting a bug, have a look at the [issue
list](https://github.com/jstemmer/go-junit-report/issues) to see if an issue
list](https://github.com/thogarty/go-junit-report/issues) to see if an issue
already exists for your problem.
- Include as much information as you can in the bug report, e.g.: the versions
of go-junit-report and the Go compiler, how go-junit-report was called, what
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build/go-junit-report-$(VERSION)-$(GOOS)-$(GOARCH).tar.gz: build/go-junit-report
build/go-junit-report-$(VERSION)-windows-amd64.zip: build/go-junit-report.exe
zip -j $@ build/go-junit-report.exe

release: test
release:
$(MAKE) GOOS=linux GOARCH=amd64 build/go-junit-report-$(VERSION)-linux-amd64.tar.gz
$(MAKE) GOOS=windows GOARCH=amd64 build/go-junit-report-$(VERSION)-windows-amd64.zip
$(MAKE) GOOS=darwin GOARCH=amd64 build/go-junit-report-$(VERSION)-darwin-amd64.tar.gz
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
go-junit-report is a tool that converts [`go test`] output to a JUnit compatible
XML report, suitable for use with applications such as [Jenkins].

[![Build status](https://github.com/jstemmer/go-junit-report/actions/workflows/main.yml/badge.svg)](https://github.com/jstemmer/go-junit-report/actions)
[![Go Reference](https://pkg.go.dev/badge/github.com/jstemmer/go-junit-report/v2.svg)](https://pkg.go.dev/github.com/jstemmer/go-junit-report/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/jstemmer/go-junit-report/v2)](https://goreportcard.com/report/github.com/jstemmer/go-junit-report/v2)
[![Build status](https://github.com/thogarty/go-junit-report/actions/workflows/main.yml/badge.svg)](https://github.com/thogarty/go-junit-report/actions)
[![Go Reference](https://pkg.go.dev/badge/github.com/thogarty/go-junit-report/v2.svg)](https://pkg.go.dev/github.com/thogarty/go-junit-report/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/thogarty/go-junit-report/v2)](https://goreportcard.com/report/github.com/thogarty/go-junit-report/v2)

## Install from package (recommended)

Expand All @@ -17,7 +17,7 @@ page.
Download and install the latest stable version from source by running:

```bash
go install github.com/jstemmer/go-junit-report/v2@latest
go install github.com/thogarty/go-junit-report/v2@latest
```

## Usage
Expand Down Expand Up @@ -86,8 +86,8 @@ packages. This can be helpful if you want to use the `go test` output parser or
create your own custom JUnit reports for example. See the package documentation
on pkg.go.dev for more information:

- [github.com/jstemmer/go-junit-report/v2/parser/gotest]
- [github.com/jstemmer/go-junit-report/v2/junit]
- [github.com/thogarty/go-junit-report/v2/parser/gotest]
- [github.com/thogarty/go-junit-report/v2/junit]

## Changelog

Expand Down Expand Up @@ -131,8 +131,8 @@ See [CONTRIBUTING.md].

[`go test`]: https://pkg.go.dev/cmd/go#hdr-Test_packages
[Jenkins]: https://www.jenkins.io/
[github.com/jstemmer/go-junit-report/v2/parser/gotest]: https://pkg.go.dev/github.com/jstemmer/go-junit-report/v2/parser/gotest
[github.com/jstemmer/go-junit-report/v2/junit]: https://pkg.go.dev/github.com/jstemmer/go-junit-report/v2/junit
[Releases]: https://github.com/jstemmer/go-junit-report/releases
[github.com/thogarty/go-junit-report/v2/parser/gotest]: https://pkg.go.dev/github.com/thogarty/go-junit-report/v2/parser/gotest
[github.com/thogarty/go-junit-report/v2/junit]: https://pkg.go.dev/github.com/thogarty/go-junit-report/v2/junit
[Releases]: https://github.com/thogarty/go-junit-report/releases
[testing]: https://pkg.go.dev/testing
[CONTRIBUTING.md]: https://github.com/jstemmer/go-junit-report/blob/master/CONTRIBUTING.md
[CONTRIBUTING.md]: https://github.com/thogarty/go-junit-report/blob/master/CONTRIBUTING.md
6 changes: 3 additions & 3 deletions internal/gojunitreport/go-junit-report.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/jstemmer/go-junit-report/v2/junit"
"github.com/jstemmer/go-junit-report/v2/parser/gotest"
"github.com/thogarty/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/junit"
"github.com/thogarty/go-junit-report/v2/parser/gotest"
)

type parser interface {
Expand Down
2 changes: 1 addition & 1 deletion junit/junit.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/gtr"
)

// Testsuites is a collection of JUnit testsuites.
Expand Down
6 changes: 3 additions & 3 deletions junit/junit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/gtr"

"github.com/google/go-cmp/cmp"
)
Expand Down Expand Up @@ -193,8 +193,8 @@ func TestWriteXML(t *testing.T) {

var suites Testsuites

ts := Testsuite{Name:"Example"}
ts.AddTestcase(Testcase{Name: "Test", })
ts := Testsuite{Name: "Example"}
ts.AddTestcase(Testcase{Name: "Test"})
suites.AddSuite(ts)

var buf bytes.Buffer
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"os"
"strings"

"github.com/jstemmer/go-junit-report/v2/internal/gojunitreport"
"github.com/jstemmer/go-junit-report/v2/parser/gotest"
"github.com/thogarty/go-junit-report/v2/internal/gojunitreport"
"github.com/thogarty/go-junit-report/v2/parser/gotest"
)

// Current release information printed by the -version flag.
var (
Version = "v2.2.0-dev"
Version = "v0.1.2"
Revision = "HEAD"
BuildTime string
)
Expand Down
2 changes: 1 addition & 1 deletion parser/gotest/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gotest
import (
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/gtr"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion parser/gotest/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gotest
import (
"time"

"github.com/jstemmer/go-junit-report/v2/parser/gotest/internal/reader"
"github.com/thogarty/go-junit-report/v2/parser/gotest/internal/reader"
)

// Event is a single event in a Go test or benchmark.
Expand Down
4 changes: 2 additions & 2 deletions parser/gotest/gotest.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/jstemmer/go-junit-report/v2/parser/gotest/internal/reader"
"github.com/thogarty/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/parser/gotest/internal/reader"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions parser/gotest/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package gotest
import (
"io"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/jstemmer/go-junit-report/v2/parser/gotest/internal/reader"
"github.com/thogarty/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/parser/gotest/internal/reader"
)

// NewJSONParser returns a new Go test json output parser.
Expand Down
4 changes: 2 additions & 2 deletions parser/gotest/report_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"strings"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/jstemmer/go-junit-report/v2/parser/gotest/internal/collector"
"github.com/thogarty/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/parser/gotest/internal/collector"
)

const (
Expand Down Expand Up @@ -93,7 +93,7 @@
case "output":
if ev.Package != "" {
pb := b.getPackageBuilder(ev.Package)
testName, _, _ := strings.Cut(ev.Data, " ")

Check failure on line 96 in parser/gotest/report_builder.go

View workflow job for this annotation

GitHub Actions / build (1.13)

undefined: strings.Cut
id, found := pb.findTest(testName)
if !found {
id, _ = pb.findTest(ev.Name)
Expand Down
4 changes: 2 additions & 2 deletions parser/gotest/report_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"
"time"

"github.com/jstemmer/go-junit-report/v2/gtr"
"github.com/jstemmer/go-junit-report/v2/parser/gotest/internal/collector"
"github.com/thogarty/go-junit-report/v2/gtr"
"github.com/thogarty/go-junit-report/v2/parser/gotest/internal/collector"

"github.com/google/go-cmp/cmp"
)
Expand Down
6 changes: 3 additions & 3 deletions testdata/017-race.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
WARNING: DATA RACE
Write at 0x00c000138168 by goroutine 8:
package/race.TestRace.func1()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:9 +0x39
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:9 +0x39

Previous write at 0x00c000138168 by goroutine 7:
package/race.TestRace()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:12 +0x105
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:12 +0x105
testing.tRunner()
/go-src/go1.18/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/go-src/go1.18/src/testing/testing.go:1486 +0x47

Goroutine 8 (running) created at:
package/race.TestRace()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:8 +0xfb
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:8 +0xfb
testing.tRunner()
/go-src/go1.18/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
Expand Down
6 changes: 3 additions & 3 deletions testdata/017-report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
WARNING: DATA RACE
Write at 0x00c000138168 by goroutine 8:
package/race.TestRace.func1()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:9 +0x39
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:9 +0x39

Previous write at 0x00c000138168 by goroutine 7:
package/race.TestRace()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:12 +0x105
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:12 +0x105
testing.tRunner()
/go-src/go1.18/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/go-src/go1.18/src/testing/testing.go:1486 +0x47

Goroutine 8 (running) created at:
package/race.TestRace()
/src/github.com/jstemmer/go-junit-report/testdata/src/race/race_test.go:8 +0xfb
/src/github.com/thogarty/go-junit-report/testdata/src/race/race_test.go:8 +0xfb
testing.tRunner()
/go-src/go1.18/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
Expand Down
2 changes: 1 addition & 1 deletion testdata/032-failed-summary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
--- PASS: TestOne (0.00s)
PASS
panic: panic
FAIL github.com/jstemmer/test/failedsummary 0.005s
FAIL github.com/thogarty/test/failedsummary 0.005s
6 changes: 3 additions & 3 deletions testdata/032-report.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="2" errors="1">
<testsuite name="github.com/jstemmer/test/failedsummary" tests="2" failures="0" errors="1" id="0" hostname="hostname" time="0.005" timestamp="2022-01-01T00:00:00Z">
<testsuite name="github.com/thogarty/test/failedsummary" tests="2" failures="0" errors="1" id="0" hostname="hostname" time="0.005" timestamp="2022-01-01T00:00:00Z">
<properties>
<property name="go.version" value="1.0"></property>
</properties>
<testcase name="TestOne" classname="github.com/jstemmer/test/failedsummary" time="0.000"></testcase>
<testcase name="Failure" classname="github.com/jstemmer/test/failedsummary" time="0.000">
<testcase name="TestOne" classname="github.com/thogarty/test/failedsummary" time="0.000"></testcase>
<testcase name="Failure" classname="github.com/thogarty/test/failedsummary" time="0.000">
<error message="Runtime error"><![CDATA[panic: panic]]></error>
</testcase>
</testsuite>
Expand Down
2 changes: 1 addition & 1 deletion testdata/generate-golden-reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"github.com/jstemmer/go-junit-report/v2/internal/gojunitreport"
"github.com/thogarty/go-junit-report/v2/internal/gojunitreport"
)

var verbose bool
Expand Down
Loading