profile
viewpoint

push eventcircleci/enterprise-setup

Daniel Nephin

commit sha a24cf18cf88631a8189cdfd37c42bc34c7df096c

Update Nomad and Docker to the versions used by cloud. Latest version of Docker CE 18.09, taken from https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/

view details

push time in 15 hours

delete branch circleci/nomad

delete branch : website-add-meganav

delete time in 2 days

delete branch circleci/nomad

delete branch : improve-copy-files

delete time in 2 days

delete branch circleci/nomad

delete branch : debug-accounting

delete time in 2 days

delete branch circleci/nomad

delete branch : doc-rkt-port-map

delete time in 2 days

delete branch circleci/nomad

delete branch : add-guides

delete time in 2 days

delete branch circleci/nomad

delete branch : vendor-ct

delete time in 2 days

delete branch circleci/nomad

delete branch : stable-website

delete time in 2 days

delete branch circleci/nomad

delete branch : docs-consul-refactor

delete time in 2 days

delete branch circleci/nomad

delete branch : b-shutdown-timing-issue-2

delete time in 2 days

delete branch circleci/nomad

delete branch : b-shutdown-timing-issue

delete time in 2 days

delete branch circleci/nomad

delete branch : b-rootless-docker

delete time in 2 days

delete branch circleci/nomad

delete branch : b-roles-in-api-pkg

delete time in 2 days

delete branch circleci/nomad

delete branch : b-reserved-ports-aws

delete time in 2 days

delete branch circleci/nomad

delete branch : b-empty-taskdir

delete time in 2 days

delete branch circleci/nomad

delete branch : b-docker-list-containers

delete time in 2 days

delete branch circleci/nomad

delete branch : b-docker-create-container

delete time in 2 days

delete branch circleci/nomad

delete branch : b-consul-task-flapping

delete time in 2 days

delete branch circleci/nomad

delete branch : b-consul-flapping

delete time in 2 days

delete branch circleci/nomad

delete branch : b-2552-chown-on-copy

delete time in 2 days

delete branch circleci/nomad

delete branch : d-meta

delete time in 2 days

PR opened circleci/enterprise-setup

Update nomad client DC to default

We don't run multiple datacenters, and us-east-1 was a lie. Cloud always used default so we have hardcoded that value in schedulerer.

Related change in https://github.com/circleci/server-manifest/pull/1740

+1 -1

0 comment

1 changed file

pr created time in 3 days

create barnchcircleci/enterprise-setup

branch : dnephin/update-nomad-datacenter

created branch time in 3 days

pull request commentdnephin/pre-commit-golang

Add recursive files in go-build hook

Go 1.13 release notes (https://golang.org/doc/go1.13#go-command) say that support was added for building multiple packages. Previously I believe you would get an error.

I think your change only works when there is a single package, or with go1.13+, although I haven't tested it.

Could you include some detail in the PR description about what problem this solves?

ramonhpr

comment created time in 8 days

delete branch dnephin/gotestyourself

delete branch : fix-nil-error-with-struct

delete time in 9 days

delete branch dnephin/gotestyourself

delete branch : add-usage-to-readme

delete time in 9 days

issue commentgotestyourself/gotest.tools

Issue when checking for nil custom error

Thanks for reporting this issue! I've had a chance to look into it more now.

It turns out we had a test case for this (https://github.com/gotestyourself/gotest.tools/blob/172219a/assert/assert_test.go#L134-L135) but it was missing an assertion for the output. Oops! When the assert is added it does indeed fail.

I was able to fix it using the suggestion you made above, so thank you also for the fix!

I've pushed the fix in #171, and linked to a more official document explaining the issue: https://golang.org/doc/faq#nil_error

eduardboamba

comment created time in 12 days

PR opened gotestyourself/gotest.tools

Handle nil structs which implement the error interface

The test for this case was missing an assertion for the outcome.

Nil structs will hit the 'case error` but will not look nil because the interface has an underlying type (the struct type) which makes it non-nil.

https://golang.org/doc/faq#nil_error

+6 -0

0 comment

2 changed files

pr created time in 12 days

create barnchdnephin/gotestyourself

branch : fix-nil-error-with-struct

created branch time in 12 days

issue commentgotestyourself/gotest.tools

unable to compile tests due to "expects import"

Added some text in #170

mankinskin

comment created time in 12 days

create barnchdnephin/gotestyourself

branch : add-usage-to-readme

created branch time in 12 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 428204f94e7bae24e4227e686d3310300e0dfb95

Remove bit.do links These links aren't so long afterall

view details

Daniel Nephin

commit sha 9f40829ea7661facc1f0e440207869b73c9b666e

Merge pull request #138 from dnephin/remove-bit-do-links Remove bit.do links

view details

Daniel Nephin

commit sha 1dc683c4098bd889fe72fdb21eff7f0bd288f366

Drop go1.8 add go1.12rc1 from CI

view details

Daniel Nephin

commit sha d9c679ca0fef2fb5457a9f7b9e5c7efce48caddb

Merge pull request #139 from dnephin/go1.12 CI: Drop go1.8 add go1.12rc1

view details

Daniel Nephin

commit sha 5b9cd64bf2fa00adb23e8aee5b7e48e91398cfbb

More godoc formatting

view details

Daniel Nephin

commit sha 1a981fb9f1fcf114488afdf610351c9cb7f702ac

Use latest go1.12 release

view details

Daniel Nephin

commit sha 045c470d778aacea42d88fdf7b4f9431c7bb8efb

Merge pull request #142 from dnephin/godoc-format More godoc formatting

view details

Daniel Nephin

commit sha 331698d449fd71842bd9c252cb53639c792a001b

Use orbs in CI config

view details

Daniel Nephin

commit sha 7617e70a12c7433e20c8bf0740397755d8d6c72c

Install git and ssh before checkout There seems to be a bug in the CircleCI native implementation of git checkout

view details

Vincent Demeester

commit sha 797fe34a8dd8741bdda0eb9913277e88c33f63e4

Merge pull request #143 from dnephin/use-orbs Use orbs in CI config

view details

Daniel Nephin

commit sha 19610f33231c2903d65e946d5d8352c6570556f0

Replace gometalinter with golangci-lint

view details

Daniel Nephin

commit sha 94e06690ac14a74f737757452f49a11c3310065f

Update dev config

view details

Vincent Demeester

commit sha 20c9fe7f37cf0fba250fe76de76181951ac43152

Merge pull request #144 from dnephin/use-golangci-lint Replace gometalinter with golangci-lint

view details

Daniel Nephin

commit sha 36de1bf199a1a962ac760ffb631f000c1628f980

Update orb version.

view details

Vincent Demeester

commit sha d1a6560d983a17c84a34edeb67898f2dc00bb646

Merge pull request #145 from gotestyourself/test-orb Update orb version

view details

Ilia Choly

commit sha c67ec8bee4a53f8dbe25828bce820d80f10ee745

golden: add Open helper function

view details

Daniel Nephin

commit sha 05ebafbffc795887a6c140584cbcad16ebfd73d0

Merge pull request #157 from icholy/master golden: add Open helper function

view details

Brian Goff

commit sha 94ad8ce28f3bfb5d46afa6aff14b22ab5b5ab487

Add support for appending fd's to icmd Commands Signed-off-by: Brian Goff <cpuguy83@gmail.com>

view details

Daniel Nephin

commit sha 400e4d0d57c4f2af599ed495cf91fe5110b618e8

Merge pull request #159 from cpuguy83/cmd_with_fd Add support for appending fd's to icmd Commands

view details

Daniel Nephin

commit sha 1541d10c2c3bf149e8e469eaa5df4b16aa04a740

Update all module dependencies

view details

push time in 12 days

pull request commentdnephin/pre-commit-golang

Add recursive files in go-build hook

Will this only work with go 1.13+?

ramonhpr

comment created time in 12 days

push eventgotestyourself/gotest.tools

zikaeroh

commit sha 6bc35c2eea35a967a8fe3cf05f491da2cc1793d0

Unexport testcase.Cleanup to fix Go 1.14

view details

Daniel Nephin

commit sha 2a4992ec05b5c9a7a9d6e46ce3d0d549c809ba5f

Merge pull request #169 from zikaeroh/fix-cleanup Unexport testcase.Cleanup to fix Go 1.14

view details

push time in 13 days

PR merged gotestyourself/gotest.tools

Unexport testcase.Cleanup to fix Go 1.14

Fixes #168.

This should be a backwards compatible change. The only way this would break users is if they explicitly defined interface { Cleanup() }, then used that type to extract access the method from a subtest's TestContext, in which case they'd break when Go 1.14 comes out anyway.

All tests pass.

Since the new Go 1.14 Cleanup(func()) overlaps with this package, it'll probably be smart to deprecate this package or make it work with the new behavior in the future, but that's another story.

+3 -3

2 comments

1 changed file

zikaeroh

pr closed time in 13 days

issue closedgotestyourself/gotest.tools

subtest's testcase.Cleanup conflicts with Go 1.14's new Cleanup

golang/go#32111 adds a cleanup function to the standard lib's testing types. This breaks x/subtest at compile time, like:

# gotest.tools/v3/x/subtest
../../../nobackup/gotip_home/gopath/pkg/mod/gotest.tools/v3@v3.0.0/x/subtest/context.go:63:10: cannot use tc (type *testcase) as type TestContext in argument to subtest:
	*testcase does not implement TestContext (wrong type for Cleanup method)
		have Cleanup()
		want Cleanup(func())
../../../nobackup/gotip_home/gopath/pkg/mod/gotest.tools/v3@v3.0.0/x/subtest/context.go:81:5: cannot use &testcase literal (type *testcase) as type TestContext in assignment:
	*testcase does not implement TestContext (wrong type for Cleanup method)
		have Cleanup()
		want Cleanup(func())

As testcase defines a Cleanup function of its own, conflicting with testing.TB's definition. This type is not exported, and Cleanup does not appear to be used externally, only in x/subtest. Can this function be unexported or renamed to allow for this package to compile at tip?

closed time in 13 days

zikaeroh

issue commentgotestyourself/gotest.tools

subtest's testcase.Cleanup conflicts with Go 1.14's new Cleanup

Thanks for the report. I saw a similar report over in another repo where I got the inspiration for x/subtest and I forgot that I had done the same thing. I'll take a closer look at how they solved it and see if the same fix can be applied here.

Since x/subtest is experimental I think it would be ok to make a breaking change and have Cleanup take a func() (assuming that would fix the problem).

zikaeroh

comment created time in 14 days

issue commentgotestyourself/gotest.tools

Issue when checking for nil custom error

I believe this is because of how interfaces work. Because you are passing a struct pointer, not an interface. https://www.pixelstech.net/article/1554553347-Be-careful-about-nil-check-on-interface-in-GoLang

I'm not sure if there is any way to fix this problem. NilError expects an interface value, not a struct pointer.

eduardboamba

comment created time in 18 days

issue commentgotestyourself/gotest.tools

unable to compile tests due to "expects import"

I'll add some notes to the README to make this easier to find

mankinskin

comment created time in 25 days

create barnchdnephin/gotestsum

branch : default-color-setting

created branch time in 25 days

issue commentgotestyourself/gotestsum

Add post-run hook to support sending desktop notifications

Started some work in #76 which I think would enable a basic notification.

File and line numbers is not something that is currently parsed. Test names are easy enough, but the file and line numbers are for the failed checks not for the tests cases themselves.

dnephin

comment created time in 25 days

PR opened gotestyourself/gotestsum

WIP: Add post-run-command hook

Pass environment variables with some summary info.

Passing the path to the junit file and json file allows the script to read the full details from one of those files, however there would be lots of parsing required.

A JSON summary file with more parsed details would help, but requires some work to figure out the correct format.

+29 -0

0 comment

2 changed files

pr created time in 25 days

create barnchdnephin/gotestsum

branch : add-post-run-command

created branch time in 25 days

issue commentgotestyourself/gotest.tools

unable to compile tests due to "expects import"

@mankinskin did you get this working with the new import path?

mankinskin

comment created time in 25 days

pull request commentgotestyourself/gotestsum

Junit XML name formats

https://github.com/gotestyourself/gotestsum/releases/tag/v0.4.0

dnephin

comment created time in 25 days

release gotestyourself/gotestsum

v0.4.0

released time in 25 days

created taggotestyourself/gotestsum

tagv0.4.0

`go test` runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test run results.

created time in 25 days

delete branch dnephin/gotestsum

delete branch : windows-ci

delete time in 25 days

push eventgotestyourself/gotestsum

Daniel Nephin

commit sha 7e52773b8084f0d8684095e0017f21810e84b7eb

Add a windows CI job

view details

Daniel Nephin

commit sha 06322b47f13f059a54ba6b652680b0014ec1246e

Merge pull request #75 from dnephin/windows-ci Add a windows CI job

view details

push time in 25 days

PR merged gotestyourself/gotestsum

Add a windows CI job
+16 -2

0 comment

1 changed file

dnephin

pr closed time in 25 days

delete branch dnephin/gotestsum

delete branch : format-verbose-errors

delete time in 25 days

push eventgotestyourself/gotestsum

Daniel Nephin

commit sha 30a7d171e335e24a8e8fe0f2b2d62a44b31c945d

Add short-with-failure format

view details

Daniel Nephin

commit sha 168b49e4f201902fcac9e328dfc08be0f496a531

Add short-with-failures to help And make the README match the help output.

view details

Daniel Nephin

commit sha 0b913352b465474730c128409945ce4492e2b40d

Merge pull request #73 from dnephin/format-verbose-errors Add short-with-failures format

view details

push time in 25 days

PR merged gotestyourself/gotestsum

Add short-with-failures format

Closes #72

Adds a new format, similar to short, that prints test output as soon as a test fails. Useful when a test suite runs for a long time and you want to see errors before the run ends.

+27 -9

2 comments

3 changed files

dnephin

pr closed time in 25 days

issue closedgotestyourself/gotestsum

Configure verbosity of failing tests separately from passing tests

When running longer test suites, I don't want to wait for the suite to finish to see my failures. Currently the only way to get this behavior is to use a -verbose format, but then I see all of my passing tests, which makes it hard to see the (comparatively) smaller number of failures.

I would like to be able to specify whether to show passing tests verbosely independently of failing tests. Something like gotestsum --format short --verbose-failures.

closed time in 25 days

wendorf

push eventdnephin/gotestsum

Daniel Nephin

commit sha 7e52773b8084f0d8684095e0017f21810e84b7eb

Add a windows CI job

view details

push time in 25 days

PR opened gotestyourself/gotestsum

Add a windows CI job
+9 -2

0 comment

1 changed file

pr created time in 25 days

create barnchdnephin/gotestsum

branch : windows-ci

created branch time in 25 days

push eventdnephin/gotestsum

Daniel Nephin

commit sha 168b49e4f201902fcac9e328dfc08be0f496a531

Add short-with-failures to help And make the README match the help output.

view details

push time in 25 days

pull request commentgotestyourself/gotestsum

Add short-with-failures format

Good catch, thanks!

dnephin

comment created time in 25 days

delete branch gotestyourself/gotest.tools

delete branch : circleci-windows

delete time in 25 days

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha ced5a50534ff3ea2b8d98156e93d9af43dc76ebc

try testing on windows

view details

Daniel Nephin

commit sha 781808a94e1d08bcfea8d3c0372294ad1a0f2232

Use latest orb

view details

Daniel Nephin

commit sha 93d21b227066c67aea756b35f8fc246203db159a

Merge pull request #165 from gotestyourself/circleci-windows Use CircleCI for windows CI

view details

push time in 25 days

pull request commentgotestyourself/gotest.tools

Use CircleCI for windows CI

I'll keep appveyor running for now, but we should be find to disable it in a while.

dnephin

comment created time in 25 days

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha 781808a94e1d08bcfea8d3c0372294ad1a0f2232

Use latest orb

view details

push time in 25 days

issue openedgotestyourself/gotestsum

Add post-run hook to support sending desktop notifications

Instead of publishing notifications directly I'd like to add support for executing a script that is passed all of the necessary details, and can handle any type of notification.

The script should be called with env vars which contain a summary of the run, and a json blob could be passed to stdin to provide full details about any errors.

Such a feature might look something like this:

export GOTESTSUM_POST_RUN_SCRIPT=./scripts/notify-test-results.sh
gotestsum

Env vars:

TEST_TOTAL=100
TEST_FAILED=2
TEST_SKIPPED=5
TEST_ERRORS=0

I'm not sure how to encode more details. The junixml format might work, but is probably not the easiest format to integrate. A custom JSON document might work but will be more involved to maintain.

Maybe env vars will work for the first version.

created time in a month

pull request commentgotestyourself/gotestsum

Junit XML name formats

Yes, I am going to try and get one or 2 more changes in and I should release a new version within a week.

dnephin

comment created time in a month

issue commentgotestyourself/gotest.tools

unable to compile tests due to "expects import"

Yup, you can change your imports to gotest.tools/v3/assert. https://github.com/marwan-at-work/mod claims to be able to automate this, although I've had mixed success.

You could also use `git grep -l '"gotest.tools/" | xargs sed ..." if you are familiar with that.

mankinskin

comment created time in a month

issue commentgotestyourself/gotest.tools

unable to compile tests due to "expects import"

Which version of Go are you using? If you aren't using go1.11+ you may need to pin the version to v2.3.0.

A v3 was released recently with full go module support, which changed the import path: https://github.com/gotestyourself/gotest.tools/pull/140

mankinskin

comment created time in a month

issue closeddnephin/pre-commit-golang

go-imports doesn't work

description

enviroment:

  • go1.13 darwin/amd64
  • pre-commit 1.18.3

.pre-commit-config.yaml:

repos:
- repo: git://github.com/dnephin/pre-commit-golang
  rev: v0.3.4
  hooks:
    - id: go-fmt
    - id: go-vet
    - id: go-imports
      exclude: 'vendor'
    - id: go-lint
    - id: go-critic
      exclude: 'vendor'
    - id: golangci-lint

error:

[ERROR] `go-imports` is not present in repository git://github.com/dnephin/pre-commit-golang.  Typo? Perhaps it is introduced in a newer version?  Often `pre-commit autoupdate` fixes this.
$ pre-commit autoupdate
Updating git://github.com/dnephin/pre-commit-golang...already up to date.

closed time in a month

jonyhy96

issue commentdnephin/pre-commit-golang

go-imports doesn't work

Tagged v0.3.5: https://github.com/dnephin/pre-commit-golang/releases/tag/v0.3.5

jonyhy96

comment created time in a month

created tagdnephin/pre-commit-golang

tagv0.3.5

Golang hooks for pre-commit

created time in a month

issue commentgotestyourself/gotestsum

test2json incorrectly attributes output to a subtest

https://github.com/golang/go/pull/34419 https://go-review.googlesource.com/c/go/+/196617

dnephin

comment created time in a month

push eventdnephin/pre-commit-golang

Jérôme Pogeant

commit sha 48115f037113dd57227fad4e9f70bd7e1d10fdd3

Add gocyclo pre-commit hook

view details

Daniel Nephin

commit sha 6982e808a164d11713fd3752f48418b331a60a24

Merge pull request #40 from Jerome1337/master Add gocyclo pre-commit hook

view details

push time in a month

PR merged dnephin/pre-commit-golang

Add gocyclo pre-commit hook

Fixes #27

+20 -1

1 comment

3 changed files

Jerome1337

pr closed time in a month

issue closeddnephin/pre-commit-golang

Add gocyclo

Add a go cyclo commit hook. Go cyclo is a tool used by go report card that contributes to a go packages letter grade.

closed time in a month

tamccall

pull request commentdnephin/pre-commit-golang

Add gocyclo pre-commit hook

Thanks!

Jerome1337

comment created time in a month

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha b42da0093c78b3184b51bf667fbad95e826fd648

Use latest orb

view details

push time in a month

push eventdnephin/golang-orb

Daniel Nephin

commit sha 34d9ffab250714fbabc51bdc8eebc4a7b9a36e44

Windows support for test command

view details

Daniel Nephin

commit sha c1d471714346344bb185103c30651779c2d67a00

Move make to do

view details

push time in a month

create barnchdnephin/golang-orb

branch : windows

created branch time in a month

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha 11ded526063b5771b41318eb0200e3ae57bb55ba

dev:testing

view details

push time in a month

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha bdb5a59f68a126b326924e7af22110d650bb79aa

dev:testing

view details

push time in a month

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha ced5a50534ff3ea2b8d98156e93d9af43dc76ebc

try testing on windows

view details

Daniel Nephin

commit sha 93a80fc622b468fdf18627e7d2f6155d6e64c092

dev:testing

view details

push time in a month

create barnchgotestyourself/gotest.tools

branch : circleci-windows

created branch time in a month

issue commentgotestyourself/gotestsum

Configure verbosity of failing tests separately from passing tests

Thanks for the feature request! I've opened PR #73 which adds a new format with that behaviour. I'd prefer to keep all the formatting behaviour on a single flag, so I opted to add a new format instead of a new flag.

Let me know if this new format works for your case you've described.

wendorf

comment created time in a month

PR opened gotestyourself/gotestsum

Add short-with-failure format

Closes #72

Adds a new format, similar to short, that prints test output as soon as a test fails. Useful when a test suite runs for a long time and you want to see errors before the run ends.

+18 -0

0 comment

2 changed files

pr created time in a month

push eventdnephin/gotestsum

Daniel Nephin

commit sha 30a7d171e335e24a8e8fe0f2b2d62a44b31c945d

Add short-with-failure format

view details

push time in a month

create barnchdnephin/gotestsum

branch : format-verbose-errors

created branch time in a month

delete branch dnephin/gotestsum

delete branch : junit-name-formats

delete time in a month

push eventgotestyourself/gotestsum

Daniel Nephin

commit sha ac42209425843142f7eb770fcb2bfbf788fa00cd

Add a config for formatting junit xml

view details

Daniel Nephin

commit sha 63d81f18ee04b6704b940b0dac6adf8e8f0e4897

Add flags for formatting junit field names

view details

Daniel Nephin

commit sha 1bfd481977a434e1a451c6d7f1341175b241adc9

Document new junit format flags

view details

Daniel Nephin

commit sha 782abf290e3d93b9c1a48f9aa76b70d65cae66ed

Merge pull request #70 from dnephin/junit-name-formats Junit XML name formats

view details

push time in a month

PR merged gotestyourself/gotestsum

Junit XML name formats

Fixes #50 Fixes #68 Closes #69

Add new command line flags for configuring the format of the junit-xml output.

The flag names are unfortunately quite long, but I think shorter names might not be sufficient in this case.

+128 -39

1 comment

10 changed files

dnephin

pr closed time in a month

issue closedgotestyourself/gotestsum

Bitbucket Pipelines Test reporting displaying tests incorrectly

I'm using this with the Bitbucket Pipelines Test reporting and found an issue that test results displayed incorrectly.

Following input:

    <testsuite tests="14" failures="2" time="1.161" name="github.com/my_org/path/to/pkg">
        <properties>
            <property name="go.version" value="go1.13"></property>
        </properties>
        <testcase classname="github.com/my_org/path/to/pkg" name="TestInMyPkg" time="0.000">
            <failure message="Failed" type="">Example Error Message</failure>
        </testcase>
    </testsuite>

results in following test representation in Bitbucket Pipelines: Screen Shot 2019-09-25 at 4 28 38 PM

While input with the short package name in the classname property:

    <testsuite tests="14" failures="2" time="1.161" name="github.com/my_org/path/to/pkg">
        <properties>
            <property name="go.version" value="go1.13"></property>
        </properties>
        <testcase classname="pkg" name="TestInMyPkg" time="0.000">
            <failure message="Failed" type="">Example Error Message</failure>
        </testcase>
    </testsuite>

Results in the much better representation on the Bitbucket Pipeliens UI: Screen Shot 2019-09-25 at 4 31 09 PM

closed time in a month

Trane9991

issue closedgotestyourself/gotestsum

Ability to apply a transformation to the "testsuite" name in junit

If I run tests on a package github.com/ijc/foo/... using -junitfile then I get results with:

<testsuite tests="33" failures="0" time="0.000000" name="github.com/ijc/foo/bar">
...
<testsuite tests="33" failures="0" time="0.000000" name="github.com/ijc/foo/baz">

...so far so good.

However if I feed this into Jenkins it creates me a directory named "github" and within that there are two entries "com/ijc/foo/bar" and "com/ijc/foo/baz", this is not really a desirable presentation.

It would be useful if gotestsum could allow fiddling with the name somehow. My preference would be to allow specifying a (common) prefix to be dropped from all the suite names (e.g. I would likely choose to drop github.com/ijc/foo/). A variant of that would be a -p«N» option (cf patch(1)) to strip «n» path elements.

I'm not sure if other transformations might be useful/better e.g. tr . - or some sort of escaping.

Just stripping a prefix has the benefit of being nice and simple I think.

closed time in a month

ijc

pull request commentgotestyourself/gotestsum

Junit XML name formats

Thanks for the suggestion! I've improve the README by including the supported values and an explanation of each value

dnephin

comment created time in a month

push eventdnephin/gotestsum

Daniel Nephin

commit sha 1bfd481977a434e1a451c6d7f1341175b241adc9

Document new junit format flags

view details

push time in a month

Pull request review commentgotestyourself/gotestsum

Junit XML name formats

 func (s *noSummaryValue) String() string { 	// flip all the bits, since the flag value is the negative of what is stored 	return (testjson.SummarizeAll ^ s.value).String() }++var junitFieldFormatValues = "full, relative, short"++type junitFieldFormatValue struct {+	value junitxml.FormatFunc+}++func (f *junitFieldFormatValue) Set(val string) error {+	switch val {+	case "full":+		return nil+	case "relative":+		f.value = testjson.RelativePackagePath+		return nil+	case "short":+		f.value = path.Base+		return nil+	}+	return errors.Errorf("invalid value: %v, must be one of: "+junitFieldFormatValues, val)+}++func (f *junitFieldFormatValue) Type() string {+	return "field-format"+}++func (f *junitFieldFormatValue) String() string {+	return "full"+}

Yup, this is what gets printed as the default value. Since there is no way to change the default value, this should always be correct.

dnephin

comment created time in a month

push eventdnephin/gotestsum

Daniel Nephin

commit sha 42ccdd9d34c385353bf379f03f5e7652762bd58d

Test go1.13

view details

Daniel Nephin

commit sha 0059e517d553c20daff4097282cd125b8093082c

Merge pull request #71 from dnephin/test-go1.13 Test go1.13

view details

Daniel Nephin

commit sha ac42209425843142f7eb770fcb2bfbf788fa00cd

Add a config for formatting junit xml

view details

Daniel Nephin

commit sha 63d81f18ee04b6704b940b0dac6adf8e8f0e4897

Add flags for formatting junit field names

view details

Daniel Nephin

commit sha e387f38e1b87a0565f9d23309df388e0e43d4a27

Document new junit format flags

view details

push time in a month

push eventdnephin/dlc-alts

Daniel Nephin

commit sha af87352f593c1642056a051c39a0e1050026cf36

prototyping

view details

push time in a month

more