Skip to content

git url parsing unit test failure with golang-1.8 #14831

@detiber

Description

@detiber

When using golang 1.8, there are failures related to parsing git urls due to changes in url.Parse in golang 1.8

Version

master

Steps To Reproduce
  1. OS_BUILD_ENV_GOLANG=1.8 hack/env make release
  2. OS_BUILD_ENV_GOLANG=1.8 hack/env make test-unit
Current Result
--- FAIL: TestParseRepository (0.08s)
	git_test.go:101: ParseRepository returned err: parse git@[2001:db8::1]:repository.git: first path segment in URL cannot contain colon
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x229c48]

goroutine 7 [running]:
testing.tRunner.func1(0xc42007d110)
	/usr/lib/golang/src/testing/testing.go:622 +0x25c
panic(0x274e40, 0x429700)
	/usr/lib/golang/src/runtime/panic.go:489 +0x284
github.com/openshift/origin/pkg/generate/git.TestParseRepository(0xc42007d110)
	/root/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/git/git_test.go:108 +0xf58
testing.tRunner(0xc42007d110, 0x2d7278)
	/usr/lib/golang/src/testing/testing.go:657 +0x9c
created by testing.(*T).Run
	/usr/lib/golang/src/testing/testing.go:697 +0x270
FAIL	github.com/openshift/origin/pkg/generate/git	0.137s
Expected Result

Unit test cases in pkg/generate/git/git_test.go should pass.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions