profile
viewpoint

alecthomas/gometalinter 3571

DEPRECATED: Use https://github.com/golangci/golangci-lint

d11wtq/dockerpty 119

Pseudo-tty handler for docker Python client

aanand/compose-file 57

Parser for the Compose file format (version 3)

dnephin/compose-addons 48

Tools to supplement the feature set of docker-compose

dnephin/alpine-package-mirror 20

Dockerfile to run an alpine package mirror or private package repo

dnephin/alpine-s6 12

Minimal example of using s6 in a docker container to handle signals as pid1

aluzzardi/dind 8

Docker in Docker Images

dnephin/cobra 2

A Commander for modern Go CLI interactions

dnephin/compose-swarm-sandbox 2

A sandboxed swarm cluster - using compose

delete branch dnephin/gotestsum

delete branch : update-gotest.tools

delete time in 10 hours

pull request commentgotestyourself/gotestsum

Update to gotest.tools/v3

Done in #91

dnephin

comment created time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha 1390b53518d890c5c0079dbdf99ed6452b870acb

Remove go1.10 from CI and remove Gopkg files Module versions are not compatible with dep, and now that go1.14 is available we can drop support for go1.10 which used dep to manage dependencies.

view details

push time in 10 hours

PR closed gotestyourself/gotestsum

Use go modules for dependencies and update dependencies

I guess this will have to wait until go1.12 is released

+107 -76

0 comment

8 changed files

dnephin

pr closed time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha ed5ed21b033acaede4814624fcccefd106dc4001

Add go1.14 to CI

view details

push time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha a84415f4bd17caeed0a91472af827ee6cd11a844

Update to gotest.tools/v3

view details

Daniel Nephin

commit sha 3b3dd96eb962db067a9ca7fd0a801c3746f6eed0

Add go1.14 to CI

view details

push time in 10 hours

push eventdnephin/gotestsum

Anmol Sethi

commit sha aaabbb33254b2a755ae04be7475635ad1aa7a87f

Improve short-verbose output for tests in CWD Prevents output that looks like this: ``` PASS ..TestHeader/readNegativeLength (0.00s) PASS ..TestHeader/lengths/124 (0.00s) PASS ..TestHeader/lengths/131072 (0.00s) PASS ..TestHeader/lengths/65535 (0.00s) PASS ..TestHeader/lengths/65537 (0.00s) PASS ..TestHeader/lengths/65536 (0.00s) PASS ..TestHeader/lengths/4096 (0.00s) PASS ..TestHeader/lengths/16384 (0.00s) PASS ..TestHeader/lengths/125 (0.00s) PASS ..TestHeader/lengths/126 (0.00s) PASS ..TestHeader/lengths (0.01s) PASS ..TestHeader/fuzz (0.33s) PASS ..TestHeader (0.00s) ``` We don't want the double dots if the test is in the CWD.

view details

Eric Billingsley

commit sha e3accd4ffbd66dc2b36e8595bc1e85bf9f07611e

always colorize output unless specifically requested not to Signed-off-by: Eric Billingsley <eric@calculi.com>

view details

Daniel Nephin

commit sha 31514b38cd471988e95c2c0d958829590288ae34

Merge pull request #63 from ebilling/master always colorize output unless specifically requested not to

view details

Daniel Nephin

commit sha fc6cb5870c5253d5b0dfe2b958d159f7aa9496a9

Merge pull request #61 from nhooyr/better-short-verbose Improve short-verbose output for tests in CWD

view details

Daniel Nephin

commit sha a616c574c6d470075a0933013ad5c3638ce7e153

Add a copyright NOTICE I believe this copyright is implied already, but adding the notice to make it explicit.

view details

Daniel Nephin

commit sha 88641c2eaaad6f6b9efa9c2bf6156be6983db87e

Merge pull request #67 from dnephin/copyright Add a copyright NOTICE

view details

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 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

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 7e52773b8084f0d8684095e0017f21810e84b7eb

Add a windows CI job

view details

Daniel Nephin

commit sha 0b913352b465474730c128409945ce4492e2b40d

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

view details

Daniel Nephin

commit sha 06322b47f13f059a54ba6b652680b0014ec1246e

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

view details

Daniel Nephin

commit sha 5b470d67de12c65c912a000f1c3c26164b408956

Default no-color to library value Predicting color from the environment is probably the correct default

view details

Daniel Nephin

commit sha aaff263ae35a76ea10a3d1b00d8744a00b2db07c

format/dots: print one package per line Replace the simple implementation with something a little fancier.

view details

Daniel Nephin

commit sha 5cec86d8b97bdc2664b203008b6dfcfdd022a941

Better test for dotsformat

view details

push time in 10 hours

delete branch dnephin/gotestyourself

delete branch : test-cleanup-integration

delete time in 10 hours

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha ebe42adb37f642684303189bd6517aec07d20d8b

Use internal/cleanup for x/subtest cleanup

view details

Daniel Nephin

commit sha bcae1f689c13f883ae3955ad165489f8b6ec862e

Test t.Cleanup() in env pkg

view details

Daniel Nephin

commit sha 9ec93ef1a9f0990537d0f4177addbf138db53736

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

Daniel Nephin

commit sha 91ecebd02efe9d0736ddc15ac58ed1a507fb5d61

Test t.Cleanup in env pkg

view details

Daniel Nephin

commit sha e6000d7b3cfa7dbb3e9965b0eb00f155e11afdc3

Merge pull request #193 from dnephin/test-cleanup-integration Test go1.14 T.Cleanup() integration

view details

push time in 10 hours

PR merged gotestyourself/gotest.tools

Test go1.14 T.Cleanup() integration

Also clean up a few other things that I found along the way.

+131 -49

0 comment

6 changed files

dnephin

pr closed time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha 6a350a032baf9b0dd08b0acd1a32600db30a6516

Add go1.14 to CI

view details

push time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha 3dcb1ca072f1f117f3d877c8042f7527e18eff42

Some possible new names for the formats

view details

Daniel Nephin

commit sha dfe7af00b83370f847ffbbd7886587d7a14bb6e4

Merge pull request #86 from dnephin/rename-formats Some possible new names for the formats

view details

Daniel Nephin

commit sha 965669347a0d1981e9c999ed06468e577c6779d5

Add slowest tests to summary Add a flag for setting the slow test threshold, defaults to 100ms. Add a count of the number of slow tests to the summary line, and list the 5 slowests tests above the threshold.

view details

push time in 10 hours

PR opened gotestyourself/gotestsum

Add go1.14 to CI
+7 -0

0 comment

1 changed file

pr created time in 10 hours

create barnchdnephin/gotestsum

branch : go1.14

created branch time in 10 hours

PR opened gotestyourself/gotestsum

Add slowest tests to summary

Add a flag for setting the slow test threshold, defaults to 100ms.

Add a count of the number of slow tests to the summary line, and list the 5 slowest tests above the threshold.

+115 -30

0 comment

5 changed files

pr created time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha 4597486a09120dce0c283797ba57dc03f208105c

Add slowest tests to summary Add a flag for setting the slow test threshold, defaults to 100ms. Add a count of the number of slow tests to the summary line, and list the 5 slowests tests above the threshold.

view details

push time in 10 hours

push eventdnephin/gotestsum

Daniel Nephin

commit sha 12a69a9b7fe2324c347fb815029510840cac25f7

Add slowest tests to summary Add a flag for setting the slow test threshold, defaults to 100ms. Add a count of the number of slow tests to the summary line, and list the 5 slowests tests above the threshold.

view details

push time in 10 hours

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 9ec93ef1a9f0990537d0f4177addbf138db53736

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

Daniel Nephin

commit sha 91ecebd02efe9d0736ddc15ac58ed1a507fb5d61

Test t.Cleanup in env pkg

view details

push time in 12 hours

Pull request review commentgotestyourself/vanityurl

Redirect to gotest.tools/v3 if no version is specified

 func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 	} } +func withDefaultVersion(version string, path string) string {+	if version == "" || versionRegexp.MatchString(path) {+		return path+	}+	return version + "/" + path+}++var versionRegexp = regexp.MustCompile(`^v\d`)

Right. So with this change it would be impossible to get redirected to the v1 pages on http://pkg.go.dev/. It assumes that anyone typing in the url wants the latest version if there is no version in the path. You can still go to the pre-v3 pages once you get there.

I don't see a way around that. I'd rather not add more logic for redirecting v1, since that is unlikely to be useful.

dnephin

comment created time in a day

Pull request review commentgotestyourself/vanityurl

Redirect to gotest.tools/v3 if no version is specified

 func TestHandler(t *testing.T) { 			goImport: "example.com/portmidi git https://github.com/rakyll/portmidi", 			goSource: "example.com/portmidi https://github.com/rakyll/portmidi _ _", 		},+		{+			name:     "gotest.tools",+			config:   gotestToolsConfig,+			path:     "/",+			goImport: "gotest.tools git https://github.com/gotestyourself/gotest.tools",+			goSource: "gotest.tools https://github.com/gotestyourself/gotest.tools https://github.com/gotestyourself/gotest.tools/tree/master{/dir} https://github.com/gotestyourself/gotest.tools/blob/master{/dir}/{file}#L{line}",+			redirect: "https://pkg.go.dev/gotest.tools/v3/",+		},+		{+			name:     "gotest.tools/gotestsum",+			config:   gotestToolsConfig,+			path:     "/gotestsum",+			goImport: "gotest.tools/gotestsum git https://github.com/gotestyourself/gotestsum",+			goSource: "gotest.tools/gotestsum https://github.com/gotestyourself/gotestsum https://github.com/gotestyourself/gotestsum/tree/master{/dir} https://github.com/gotestyourself/gotestsum/blob/master{/dir}/{file}#L{line}",+			redirect: "https://pkg.go.dev/gotest.tools/gotestsum/",+		},+		{+			name:     "gotest.tools/assert",+			config:   gotestToolsConfig,+			path:     "/assert",+			goImport: "gotest.tools git https://github.com/gotestyourself/gotest.tools",+			goSource: "gotest.tools https://github.com/gotestyourself/gotest.tools https://github.com/gotestyourself/gotest.tools/tree/master{/dir} https://github.com/gotestyourself/gotest.tools/blob/master{/dir}/{file}#L{line}",+			redirect: "https://pkg.go.dev/gotest.tools/v3/assert",+		},+		{+			name:     "gotest.tools/v5/assert",+			config:   gotestToolsConfig,+			path:     "/v5/assert",+			goImport: "gotest.tools git https://github.com/gotestyourself/gotest.tools",+			goSource: "gotest.tools https://github.com/gotestyourself/gotest.tools https://github.com/gotestyourself/gotest.tools/tree/master{/dir} https://github.com/gotestyourself/gotest.tools/blob/master{/dir}/{file}#L{line}",+			redirect: "https://pkg.go.dev/gotest.tools/v5/assert",+		}, 	}-	for _, test := range tests {-		h, err := newHandler([]byte(test.config))-		if err != nil {-			t.Errorf("%s: newHandler: %v", test.name, err)-			continue-		}-		s := httptest.NewServer(h)-		resp, err := http.Get(s.URL + test.path)-		if err != nil {-			s.Close()-			t.Errorf("%s: http.Get: %v", test.name, err)-			continue-		}-		data, err := ioutil.ReadAll(resp.Body)-		resp.Body.Close()-		s.Close()-		if resp.StatusCode != http.StatusOK {-			t.Errorf("%s: status code = %s; want 200 OK", test.name, resp.Status)-		}-		if err != nil {-			t.Errorf("%s: ioutil.ReadAll: %v", test.name, err)-			continue-		}-		if got := findMeta(data, "go-import"); got != test.goImport {-			t.Errorf("%s: meta go-import = %q; want %q", test.name, got, test.goImport)-		}-		if got := findMeta(data, "go-source"); got != test.goSource {-			t.Errorf("%s: meta go-source = %q; want %q", test.name, got, test.goSource)-		}++	for _, tc := range tests {+		t.Run(tc.name, func(t *testing.T) {

Capturing the loop variable is only necessary if t.Parallel() is used, right?

dnephin

comment created time in a day

Pull request review commentgotestyourself/vanityurl

Redirect to gotest.tools/v3 if no version is specified

 func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 	} } +func withDefaultVersion(version string, path string) string {+	if version == "" || versionRegexp.MatchString(path) {+		return path+	}+	return version + "/" + path+}++var versionRegexp = regexp.MustCompile(`^v\d`)

Why shouldn't v1 be matched? I think if there is any v\d at the start of the path we don't want to prepend a different version.

dnephin

comment created time in a day

issue commentgotestyourself/gotestsum

dots formatting broken in v0.4.1

Thanks for the report! I meant to keep a format for the original version of dots, but it looks like I forgot. Sorry about that!

#89 adds a dots-compact option which is the original dots format.

jonasdebeukelaer

comment created time in a day

PR opened gotestyourself/gotestsum

Re-add the original dots format

as dots-compact

+3 -0

0 comment

2 changed files

pr created time in a day

create barnchdnephin/gotestsum

branch : restore-original-dots-format

created branch time in a day

Pull request review commentgotestyourself/gotest.tools

Test go1.14 T.Cleanup() integration

 func GoVersionLessThan(minor int64) bool { 	if len(parts) < 2 { 		return false 	}-	actual, err := strconv.ParseInt(parts[1], 10, 32)-	return err == nil && parts[0] == "1" && actual < minor+	ma, err := strconv.ParseInt(parts[0], 10, 32)+	if err != nil {+		return false+	}+	mi, err := strconv.ParseInt(parts[1], 10, 32)+	if err != nil {+		return false+	}+	return ma <= major && mi < minor

This will be wrong when there is more than 1 major version

dnephin

comment created time in 2 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha dd8a0cf48352cb02ec1779634a397e81eb6d2b03

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

Daniel Nephin

commit sha 83b8ef3e00f220f697804848f08fabc2bc129806

Test t.Cleanup in env pkg

view details

push time in 2 days

PR opened gotestyourself/gotest.tools

Test go1.14 T.Cleanup() integration

Also clean up a few other things that I found along the way.

+134 -49

0 comment

7 changed files

pr created time in 2 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha ec41a8879978799d23d1d183895a54a183453a54

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

Daniel Nephin

commit sha 9207969299fb96204f571740e8e399a53b598941

Test t.Cleanup in env pkg

view details

push time in 2 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha ebe42adb37f642684303189bd6517aec07d20d8b

Use internal/cleanup for x/subtest cleanup

view details

Daniel Nephin

commit sha bcae1f689c13f883ae3955ad165489f8b6ec862e

Test t.Cleanup() in env pkg

view details

Daniel Nephin

commit sha b3074840a5c94902e6c81f84baf8ca44cb2a880b

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

Daniel Nephin

commit sha 9585c3b1c6ed9ff24c0e24294d224305d6f90fb6

Test t.Cleanup in env pkg

view details

push time in 2 days

issue commentgotestyourself/gotest.tools

Comparing dirs with symlinks does not work

Created #192 for the WithSymlink problem

mat007

comment created time in 2 days

issue openedgotestyourself/gotest.tools

Fix fs.WithSymlink lack of symmetry

fs.WithSymlink, when used with a Dir or File creates a link with an absolute path, when used with a Manifest it expects a relative path.

I think both cases could be useful, but having different behaviour in the same function is a problem. I think this function can be deprecated and replaced with: fs.WithRelativeSymlink and fs.WithAbsoluteSymlink which have consistent behaviour for all types of Path.

created time in 2 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 8bf034b4f2bf476a4527870de95eddb56d215b4c

Improve Go version lookup func signature Also clean up some special cases in the tests that are likely unecessary.

view details

push time in 2 days

create barnchdnephin/gotestyourself

branch : test-cleanup-integration

created branch time in 2 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 0a11a57fd527d47f8b130d0e154b5ba8ea06c26f

assert: Fix NilError, error non-nil type The previous fix incorrectly reported non-nil types as nil errors. Instead this commit handles the case by using a different error message.

view details

Daniel Nephin

commit sha bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3

Merge pull request #187 from dnephin/non-nil-type-errors assert: Fix NilError, error non-nil type

view details

Daniel Nephin

commit sha 6aaeafba6b44b32be61f778230cf58d4d8b61712

Test with go14.rc1

view details

Daniel Nephin

commit sha e8cd7d90c598e3e979ab6c26dc688ecaa091c5e8

Fix lint problems after updating golangci-lint

view details

Daniel Nephin

commit sha 113abfd28b9c501466aff1709e1ab80d6dcf7c1b

Merge pull request #189 from dnephin/go1.14rc1 Add go14.rc1 to CI

view details

Daniel Nephin

commit sha 987f0d959dca97a28a3a2582bb360ccf3918ba8d

Update godoc links to pkg.go.dev The godoc links are broken because of the /v3/ in the path, so may as well update the links to a working page. We can revert this commit when the package urls are redirected to pkg.go.dev.

view details

Vincent Demeester

commit sha 18dcdd0457d8537e1bceef136c8d3b45d4ac5e76

Merge pull request #190 from dnephin/fix-readme-links Update godoc links to pkg.go.dev

view details

Anthony Fok

commit sha e7180e83e1b8864cfa7616dfef6178c829be4ae0

Upgrade to go-cmp v0.4.0 and adjust assert/cmp/compare_test.go accordingly. In go-cmp v0.4.0, for user convenience, full name of the type is printed in the panic message when accessing an unexported field, see google/go-cmp#171

view details

Daniel Nephin

commit sha 6e2c8b000d85ec1eeef5eed2a54a7e0de09eda7a

Skip some tests on go1.10 Upgrading go-cmp causes these tests to fail because the expected value has some duplicate path segments. The go1.10 suite should be removed from CI soon because it is now over 2 years old.

view details

Daniel Nephin

commit sha 28575f684cf0ca73c2ef2e40a5c86352ec3cd781

Merge pull request #191 from anthonyfok/upgrade-to-go-cmp-v0.4.0 Upgrade to go-cmp v0.4.0

view details

push time in 2 days

create barnchgotestyourself/vanityurl

branch : default-version-redirect-2

created branch time in 2 days

issue commentgotestyourself/gotest.tools

All of the godoc pages appear to be currently blank

https://github.com/gotestyourself/vanityurl/pull/2 should fix the "defaults to redirecting to non-v3 urls" problem.

glenjamin

comment created time in 2 days

PR opened gotestyourself/vanityurl

Redirect to gotest.tools/v3 if no version is specified

https://github.com/gotestyourself/gotest.tools/issues/188#issuecomment-587569538

+135 -47

0 comment

5 changed files

pr created time in 2 days

create barnchgotestyourself/vanityurl

branch : default-version-redirect

created branch time in 2 days

release gotestyourself/gotestsum

v0.4.1

released time in 2 days

created taggotestyourself/gotestsum

tagv0.4.1

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

created time in 2 days

delete branch dnephin/gotestsum

delete branch : rename-formats

delete time in 2 days

push eventgotestyourself/gotestsum

Daniel Nephin

commit sha 3dcb1ca072f1f117f3d877c8042f7527e18eff42

Some possible new names for the formats

view details

Daniel Nephin

commit sha dfe7af00b83370f847ffbbd7886587d7a14bb6e4

Merge pull request #86 from dnephin/rename-formats Some possible new names for the formats

view details

push time in 2 days

PR merged gotestyourself/gotestsum

Some possible new names for the formats

short and short-verbose don't say very much about the format.

+13 -13

0 comment

3 changed files

dnephin

pr closed time in 2 days

push eventdnephin/gotestsum

Daniel Nephin

commit sha 3dcb1ca072f1f117f3d877c8042f7527e18eff42

Some possible new names for the formats

view details

push time in 2 days

push eventdnephin/gotestsum

Daniel Nephin

commit sha 00f0244ac91c69fcfabe464b9d9dad3068af9dc3

Some possible new names for the formats

view details

push time in 2 days

push eventgotestyourself/gotestsum

Daniel Nephin

commit sha ec829b209f8c18b8bd735a64c09610573762f091

Update demo scripts

view details

push time in 2 days

push eventgotestyourself/gotest.tools

Anthony Fok

commit sha e7180e83e1b8864cfa7616dfef6178c829be4ae0

Upgrade to go-cmp v0.4.0 and adjust assert/cmp/compare_test.go accordingly. In go-cmp v0.4.0, for user convenience, full name of the type is printed in the panic message when accessing an unexported field, see google/go-cmp#171

view details

Daniel Nephin

commit sha 6e2c8b000d85ec1eeef5eed2a54a7e0de09eda7a

Skip some tests on go1.10 Upgrading go-cmp causes these tests to fail because the expected value has some duplicate path segments. The go1.10 suite should be removed from CI soon because it is now over 2 years old.

view details

Daniel Nephin

commit sha 28575f684cf0ca73c2ef2e40a5c86352ec3cd781

Merge pull request #191 from anthonyfok/upgrade-to-go-cmp-v0.4.0 Upgrade to go-cmp v0.4.0

view details

push time in 2 days

PR merged gotestyourself/gotest.tools

Upgrade to go-cmp v0.4.0

and adjust assert/cmp/compare_test.go accordingly.

In go-cmp v0.4.0, for user convenience, full name of the type is printed in the panic message when accessing an unexported field, see google/go-cmp#171

Many thanks!

Anthony

+11 -5

5 comments

5 changed files

anthonyfok

pr closed time in 2 days

delete branch dnephin/gotestyourself

delete branch : upgrade-to-go-cmp-v0.4.0

delete time in 2 days

push eventanthonyfok/gotest.tools

Daniel Nephin

commit sha 6e2c8b000d85ec1eeef5eed2a54a7e0de09eda7a

Skip some tests on go1.10 Upgrading go-cmp causes these tests to fail because the expected value has some duplicate path segments. The go1.10 suite should be removed from CI soon because it is now over 2 years old.

view details

push time in 2 days

create barnchdnephin/gotestyourself

branch : upgrade-to-go-cmp-v0.4.0

created branch time in 2 days

push eventanthonyfok/gotest.tools

Daniel Nephin

commit sha 02b0d45a09f2aa1d4913c194ea6cebd9c0fc69f4

Skip some tests on go1.10 Upgrading go-cmp causes these tests to fail because the expected value has some duplicate path segments. The go1.10 suite should be removed from CI soon because it is now over 2 years old.

view details

push time in 2 days

created repositorydnephin/tasklib

created time in 2 days

Pull request review commentdnephin/dobi

Added 'pull: local'

 import ( func RunPull(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error) { 	record, err := getImageRecord(recordPath(ctx, t.config)) 	if err != nil {-		t.logger().Warnf("Failed to get image record: %s", err)+		if os.IsNotExist(err) {+			t.logger().Info("Creating image record")+			image, err := GetImage(ctx, t.config)+			if err != nil {+				return false, err+			}+			record := imageModifiedRecord{ImageID: image.ID}+			updateImageRecord(recordPath(ctx, t.config), record)+			if err != nil {+				return false, err+			}+		} else {+			t.logger().Warnf("Failed to get image record: %s", err)+		}

Without the section the image is used properly, but the warning might disturb the force for some users.

Good thinking!

Something like this might work, but if not I think the warning is fine for now:

record, err := getImageRecord(recordPath(ctx, t.config))
switch {
case !t.config.Pull.Required(record.LastPull):
    t.logger().Debugf("Pull not required")
    return false, nil
case err != nil:
    t.logger().Warnf("Failed to get image record: %s", err)
}
siredmar

comment created time in 2 days

Pull request review commentdnephin/dobi

Added 'pull: local'

 import ( func RunPull(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error) { 	record, err := getImageRecord(recordPath(ctx, t.config)) 	if err != nil {-		t.logger().Warnf("Failed to get image record: %s", err)+		if os.IsNotExist(err) {+			t.logger().Info("Creating image record")+			image, err := GetImage(ctx, t.config)+			if err != nil {+				return false, err+			}+			record := imageModifiedRecord{ImageID: image.ID}+			updateImageRecord(recordPath(ctx, t.config), record)+			if err != nil {+				return false, err+			}+		} else {+			t.logger().Warnf("Failed to get image record: %s", err)+		}

The test output is stored as an artifact in CI: https://app.circleci.com/jobs/github/dnephin/dobi/1176/artifacts

It looks like both failures are a result of failed to execute task "runner:pull": no such image.

This change would run any time an image record is missing, not only when pull: never is set.

I think the call to GetImage is the problem, but I haven't dug into why exactly.

siredmar

comment created time in 2 days

pull request commentgotestyourself/gotest.tools

Upgrade to go-cmp v0.4.0

Thank you for the PR!

anthonyfok

comment created time in 3 days

pull request commentgotestyourself/gotest.tools

Upgrade to go-cmp v0.4.0

I think it would be fine to skip the failing test on go1.10, we will probably remove that test suite soon.

anthonyfok

comment created time in 3 days

issue closedGoogleCloudPlatform/govanityurls

http (non-https) urls still redirecting to godoc.org

Recently I pulled in the changes from #33 and #34.

https urls (ex: https://gotest.tools/) redirect properly to https://pkg.go.dev/ However http urls (ex http://gotest.tools/) continue to redirect to https://godoc.org

I attempted to set secure: always in the app.yaml, but that has not fixed the problem.

I confirmed in the appengine logs that the requests to http are going to the same service and version. No instances of older versions are running. The main difference in the logs seems to be that https requests get a 204 response code, and the http requests get a 200 response code.

I was previously already running with runtime: go112, but I may not have noticed the requests being handled incorrectly because nothing else had changed in the application.

Do you know if the upgrade to go1.12 runtime may be causing this problem, or how else I might be able to debug? I tried looking around stackoverflow but found nothing relevant.

I understand this issue may be an appengine bug, and not related to this project, but I thought I would ask here in case someone else using this project had the same problem.

closed time in 3 days

dnephin

issue commentGoogleCloudPlatform/govanityurls

http (non-https) urls still redirecting to godoc.org

Oh, cool, http://gotest.tools is working now! Maybe the old pages were cached somewhere yesterday for a few hours.

The https://godoc.org/gotest.tools/assert error was the original problem I was trying to work around. godoc doesn't understanding package paths when there is a module version in them.

Thanks for taking a look! Seems resolved now.

dnephin

comment created time in 3 days

issue openedGoogleCloudPlatform/govanityurls

http (non-https) urls still redirecting to godoc.org

Recently I pulled in the changes from #33 and #34.

https urls (ex: https://gotest.tools/) redirect properly to https://pkg.go.dev/ However http urls (ex http://gotest.tools/) continue to redirect to https://godoc.org

I attempted to set secure: always in the app.yaml, but that has not fixed the problem.

I confirmed in the appengine logs that the requests to http are going to the same service and version. No instances of older versions are running. The main difference in the logs seems to be that https requests get a 204 response code, and the http requests get a 200 response code.

I was previously already running with runtime: go112, but I may not have noticed the requests being handled incorrectly because nothing else had changed in the application.

Do you know if the upgrade to go1.12 runtime may be causing this problem, or how else I might be able to debug? I tried looking around stackoverflow but found nothing relevant.

I understand this issue may be an appengine bug, and not related to this project, but I thought I would ask here in case someone else using this project had the same problem.

created time in 4 days

push eventgotestyourself/vanityurl

Daniel Nephin

commit sha 7d96c4d8e4390c625bf358526e7281f84f79b83a

Use secure: always to redirect http->https

view details

push time in 4 days

issue commentgotestyourself/gotest.tools

All of the godoc pages appear to be currently blank

I pulled in some changes which got the https urls to reidrect (https://gotest.tools/), but http is still going to the old url for some reason.

I think i should be possible to add a v3 if there is no version in the url, but I haven't looked at adding that yet.

glenjamin

comment created time in 4 days

Pull request review commentdnephin/dobi

Added 'pull: local'

 func pullAlways(_ *time.Time) bool { 	return true } +func pullLocal(_ *time.Time) bool {

With the change above this would be pullNever

siredmar

comment created time in 4 days

Pull request review commentdnephin/dobi

Added 'pull: local'

 type ImageConfig struct { 	// Pull Pull an image instead of building it. The value may be one of: 	// * ``once`` - only pull if the image:tag does not exist 	// * ``always`` - always pull the image+	// * ``local`` - don't pull or build the image. Use one that is already present locally

I think the term never would be more appropriate here. It fits better with once, and always. The description sounds good, and shouldn't need to change.

siredmar

comment created time in 4 days

Pull request review commentdnephin/dobi

Added 'pull: local'

 import ( func RunPull(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error) { 	record, err := getImageRecord(recordPath(ctx, t.config)) 	if err != nil {-		t.logger().Warnf("Failed to get image record: %s", err)+		if os.IsNotExist(err) {+			t.logger().Info("Creating image record")+			image, err := GetImage(ctx, t.config)+			if err != nil {+				return false, err+			}+			record := imageModifiedRecord{ImageID: image.ID}+			updateImageRecord(recordPath(ctx, t.config), record)+			if err != nil {+				return false, err+			}+		} else {+			t.logger().Warnf("Failed to get image record: %s", err)+		}

I think this change is likely part of what is breaking the example tests. This shouldn't be necessary because the line below t.config.Pull.required() should always return false (because pullLocal returns false) and RunPull will exit there.

Does it work if you remove this block?

siredmar

comment created time in 4 days

push eventgotestyourself/vanityurl

Brandon Philips

commit sha 26a09c434df4eec6dc5a11e456765769998ebb7c

Update to use app engine runtime go112 (#34) * app.yaml: update to go112 Make the required changes to use go112 due to the deprecation of Go 1.9. Migration doc: - https://cloud.google.com/appengine/docs/standard/go111/go-differences References: - https://github.com/GoogleCloudPlatform/govanityurls/issues/29#issuecomment-506538041 - https://github.com/etcd-io/maintainers/issues/17 * go.mod: initial commit Migrate this project to use go.mod and update the README. This is part of the recommended steps to runtime: go111 and beyond. https://cloud.google.com/appengine/docs/standard/go111/go-differences * vendor: add dependent packages Add all dependencies for the project via vendoring for offline builds. * travis.yml: drop go 1.6 for 1.12 Go 1.6 is too old to have a number of builtin packages for the latest appengine package. Remove and update to match app engine version: 1.12. * appengine.go: remove unused file From the go111 migration doc: "The appengine build tag is deprecated and will not be used when building your app for deployment. Ensure your code still functions correctly without it being set." https://cloud.google.com/appengine/docs/standard/go111/go-differences * main: respect PORT environment variable The go111 runtime should use the PORT variable to decide the listening http port. "PORT The port that receives HTTP requests." https://cloud.google.com/appengine/docs/standard/go111/runtime

view details

Brandon Philips

commit sha 6a082708bf3bbd34b0fc6c87e0350b40b2f3801e

handler: use pkg.go.dev instead of golang.org (#33) golang.org now has a warning to use pkg.go.dev instead. Use the new URL.

view details

Daniel Nephin

commit sha 86589d428e16dd3c1c08d7166c51406677cdf94a

Merge branch 'master' of github.com:GoogleCloudPlatform/govanityurls into gotest.tools

view details

Daniel Nephin

commit sha b985123b93781a7954aa5d0fedc8ed42764d90d8

Update README remove deploy script update ignore files

view details

push time in 4 days

issue commentgotestyourself/gotest.tools

All of the godoc pages appear to be currently blank

Oh ya! I forgot that is a thing I setup. I can make it redirect to https://pkg.go.dev/gotest.tools/v3/

Adding the /v3 to the url sends to the right docs

glenjamin

comment created time in 4 days

issue commentgotestyourself/gotestsum

Cobertura XML test coverage output

Maybe I am missing something, but Go 1.10 (go test -coverprofile=...) does not make gocov obsolete but actually makes it possible.

It is definitely possible I am wrong. I should elaborate on how I reached this conclusion:

  • Go1.10 was first released on 2018-02-16. gocov dates back to June 2012.

  • Previous to go 1.10 it was not possible to run go test with multiple package if the --coverprofile flag was used. It required that you run every pacakge with a separate go test command. From the go1.10 release notes:

    Also, the go test -coverprofile option is now supported when running multiple tests.

  • Because of this limitation many people used tools like gocov, or bash scripts to run each package separately.

gocov does also provide some help with the reports, however as of Go1.2 (first rleased on 2013-12-01) the go toolchain provides similar functionality: https://golang.org/doc/go1.2#cover.

There may be other features of gocov that I'm missing, but at least the primary features seem to be covered by the go toolchain. The interchange format doesn't seem all that valuable itself if no other tools support it.

I guess maybe the reports it produces may be a better than what the standard go tool cover provide?

fdcds

comment created time in 9 days

issue commentdnephin/dobi

Chocolatey package for installing on Windows

Thank you for creating the package! A PR to add a link to the Chocolatey install would be great.

flcdrg

comment created time in 10 days

issue commentgotestyourself/gotestsum

Cobertura XML test coverage output

Thank you for opening this issue!

I was not familiar with gocov or the Cobertura so I had a look. As I understand it, the situation is something like this:

  • As of go1.10 a lot of what gocov does is unnecessary. go test now supports adding a -coverprofile when running with multiple package
  • gocov-xml is close to what you want, except that instead of reading the golang coverage format it reads the gocov JSON

Since the input to the xml is a file created by go test, there is little benefit for that program to be part of gotestsum. It could be a completely separate tool as none of the code would overlap. The only benefit to integrating it in this repo would ease maintenance and installation for users of both tools.

I found https://github.com/t-yuki/gocover-cobertura which seems to be exactly what would be needed. It appears to read the standard go coverage files and output the Cobertura XML format. If I understand correctly the go tool cover command has been included in the standard release since go1.2, so that at least reduces the number of tools to 2.

I'm hesitant to integrate that tool since the code wouldn't benefit from that integration.

fdcds

comment created time in 11 days

delete branch dnephin/gotestyourself

delete branch : fix-readme-links

delete time in 13 days

issue commentgotestyourself/gotest.tools

All of the godoc pages appear to be currently blank

#190 fixes the links in the docs

glenjamin

comment created time in 13 days

PR opened gotestyourself/gotest.tools

Update godoc links to pkg.go.dev

Related to #188

The godoc links are broken because of the /v3/ in the path, so may as well update the links to a working page.

We can revert this commit when the package urls are redirected to https://pkg.go.dev.

+13 -13

0 comment

3 changed files

pr created time in 13 days

create barnchdnephin/gotestyourself

branch : fix-readme-links

created branch time in 13 days

delete branch dnephin/gotestyourself

delete branch : go1.14rc1

delete time in 13 days

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha 6aaeafba6b44b32be61f778230cf58d4d8b61712

Test with go14.rc1

view details

Daniel Nephin

commit sha e8cd7d90c598e3e979ab6c26dc688ecaa091c5e8

Fix lint problems after updating golangci-lint

view details

Daniel Nephin

commit sha 113abfd28b9c501466aff1709e1ab80d6dcf7c1b

Merge pull request #189 from dnephin/go1.14rc1 Add go14.rc1 to CI

view details

push time in 13 days

pull request commentgotestyourself/gotest.tools

Add go14.rc1 to CI

Once go1.14 is officially released I think we can drop go1.10

dnephin

comment created time in 13 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha e8cd7d90c598e3e979ab6c26dc688ecaa091c5e8

Fix lint problems after updating golangci-lint

view details

push time in 13 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 1f710fce33b59084b035fa21872f5d1b92f560f7

Fix lint problems after updating golangci-lint

view details

push time in 13 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 6aaeafba6b44b32be61f778230cf58d4d8b61712

Test with go14.rc1

view details

push time in 13 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 031c3ce3a4a12e188523daff3c7e08943b9280f1

Test with go14.rc1

view details

push time in 13 days

PR opened gotestyourself/gotest.tools

Add go14.rc1 to CI
+6 -1

0 comment

1 changed file

pr created time in 13 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 40d5a881b6befbc5305e24b974427fdb37f4ab83

Test with go14.rc1

view details

push time in 13 days

create barnchdnephin/gotestyourself

branch : go1.14rc1

created branch time in 13 days

release gotestyourself/gotest.tools

v3.0.0

released time in 13 days

release gotestyourself/gotest.tools

v3.0.2

released time in 13 days

pull request commentgotestyourself/gotest.tools

assert: Fix NilError, error non-nil type

tagged v3.0.2 with this fix

dnephin

comment created time in 13 days

created taggotestyourself/gotest.tools

tagv3.0.2

A collection of packages to augment the go testing package and support common patterns.

created time in 13 days

delete branch dnephin/gotestyourself

delete branch : non-nil-type-errors

delete time in 13 days

push eventgotestyourself/gotest.tools

Daniel Nephin

commit sha 0a11a57fd527d47f8b130d0e154b5ba8ea06c26f

assert: Fix NilError, error non-nil type The previous fix incorrectly reported non-nil types as nil errors. Instead this commit handles the case by using a different error message.

view details

Daniel Nephin

commit sha bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3

Merge pull request #187 from dnephin/non-nil-type-errors assert: Fix NilError, error non-nil type

view details

push time in 13 days

PR merged gotestyourself/gotest.tools

Reviewers
assert: Fix NilError, error non-nil type

The previous fix in #171 incorrectly reported non-nil types as nil errors. Instead this commit handles the case by using a different error message.

Fixes #185 Fixes #186

+64 -21

1 comment

2 changed files

dnephin

pr closed time in 13 days

issue closedgotestyourself/gotest.tools

"reflect: call of reflect.Value.IsNil on struct Value" for struct error type

The following code panics, as NilError is attempting to check IsNil on a non-pointer struct:

type structError struct{}

func (structError) Error() string {
	return "this is structError"
}

func TestStructError(t *testing.T) {
	var err error = structError{}
	assert.NilError(t, err)
}
--- FAIL: TestStructError (0.00s)
panic: reflect: call of reflect.Value.IsNil on struct Value [recovered]
	panic: reflect: call of reflect.Value.IsNil on struct Value

goroutine 21 [running]:
testing.tRunner.func1(0xc000110300)
	/usr/lib/go/src/testing/testing.go:874 +0x3a3
panic(0x59a640, 0xc000096120)
	/usr/lib/go/src/runtime/panic.go:679 +0x1b2
reflect.Value.IsNil(...)
	/usr/lib/go/src/reflect/value.go:1073
gotest.tools/v3/assert.assert(0x60d4c0, 0xc000110300, 0xc00007ef00, 0x5dec38, 0x5a0360, 0x748a08, 0x0, 0x0, 0x0, 0x0)
	/home/jake/go/pkg/mod/gotest.tools/v3@v3.0.1/assert/assert.go:123 +0x773
gotest.tools/v3/assert.NilError(0x60d4c0, 0xc000110300, 0x609d80, 0x748a08, 0x0, 0x0, 0x0)
	/home/jake/go/pkg/mod/gotest.tools/v3@v3.0.1/assert/assert.go:249 +0x101
some.tld/baderr.TestStructError(0xc000110300)
	/home/jake/testproj/baderr/err_test.go:36 +0x60
testing.tRunner(0xc000110300, 0x5df150)
	/usr/lib/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
	/usr/lib/go/src/testing/testing.go:960 +0x350
FAIL	some.tld/baderr	0.009s
FAIL

The struct doesn't need to be empty; it can have values. Related to #167/#171.

However, I think #171 needs to be reverted anyway (#185), because a typed nil error is not "nil".

closed time in 13 days

zikaeroh

issue closedgotestyourself/gotest.tools

Typed nil errors should not pass "NilError"

I don't think the fix for #167 (#171) was entirely correct. A typed nil error is not a nil error when compared against nil in a normal context.

package baderr

import (
	"testing"

	"gotest.tools/v3/assert"
)

type myEvilError struct{}

func (m *myEvilError) Error() string {
	return "this is an error"
}

func doSomething() error {
	var err *myEvilError
	return err // NOT nil, this has a type.
}

// Should not pass.
func TestErrorNil(t *testing.T) {
	assert.NilError(t, doSomething()) // This says it's nil.
}

func TestErrorNotNil(t *testing.T) {
	assert.Assert(t, doSomething() != nil) // An actual comparison says it's not nil.
}

closed time in 13 days

zikaeroh

Pull request review commentgotestyourself/gotest.tools

assert: Fix NilError, error non-nil type

 func logFailureFromBool(t TestingT, msgAndArgs ...interface{}) { 	t.Log(format.WithCustomMessage(failureMessage+msg, msgAndArgs...)) } +func failureMsgFromError(err error) string {+	// Handle errors with non-nil types+	v := reflect.ValueOf(err)+	if v.Kind() == reflect.Ptr && v.IsNil() {+		return fmt.Sprintf("error is not nil: error has type %T", err)

That is true. I suspect that most error implementations which use a pointer receiver will require it to be non-nil. I would generally like to avoid the panic/recover, so would prefer to not add it for such a rare case, but it could be done as a future improvement.

dnephin

comment created time in 13 days

push eventdnephin/gotestsum

Daniel Nephin

commit sha 2846ef62a763bacc5ca23affcd59dc4f48f81330

wip

view details

push time in 14 days

create barnchdnephin/gotestsum

branch : slowest-test

created branch time in 14 days

issue commentgotestyourself/gotest.tools

All of the godoc pages appear to be currently blank

https://groups.google.com/forum/#!msg/golang-dev/mfiPCtJ1BGU/qtCrqlrEEwAJ

godoc is being retired, https://pkg.go.dev is the replacement.

glenjamin

comment created time in 17 days

push eventdnephin/gotestyourself

Daniel Nephin

commit sha 0a11a57fd527d47f8b130d0e154b5ba8ea06c26f

assert: Fix NilError, error non-nil type The previous fix incorrectly reported non-nil types as nil errors. Instead this commit handles the case by using a different error message.

view details

push time in 17 days

more