dgit icon indicating copy to clipboard operation
dgit copied to clipboard

TestLsFiles failing on Mac

Open sirnewton01 opened this issue 7 years ago • 3 comments

When running with Go 1.10 on Mac OS X 10.13 (High Sierra) this test is failing consistently.

=== RUN   TestLsFiles
--- FAIL: TestLsFiles (0.00s)
	lsfiles_test.go:139: Case 2: Unexpected number of results: got [] want [anothertest/bar foo test/bar]
	lsfiles_test.go:139: Case 3: Unexpected number of results: got [] want [bar]
	lsfiles_test.go:139: Case 4: Unexpected number of results: got [] want [../anothertest/bar ../foo bar]
	lsfiles_test.go:148: Case 5 index 0: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/anothertest/bar want ../anothertest/bar
	lsfiles_test.go:148: Case 5 index 1: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/foo want ../foo
	lsfiles_test.go:148: Case 5 index 2: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/test/bar want bar
	lsfiles_test.go:139: Case 6: Unexpected number of results: got [] want [anothertest/bar]

sirnewton01 avatar Jul 11 '18 18:07 sirnewton01

I can't look into this much since I don't have a Mac for go development, but my gut feeling tells me it's related to /tmp being a symlink to a weird location on Macs based on the case 5 failures.

driusan avatar Jul 15 '18 14:07 driusan

I'm thinking of closing this. It's a weird Mac edge case. It doesn't impact me really anymore since we have the Travis integration. It's probably because of the weird /tmp situation on Mac and the way the test works. In reality, this is pretty unlikely to be a problem on Mac in practice and it is not a primary platform for dgit.

sirnewton01 avatar Feb 28 '19 14:02 sirnewton01

If they're still failing, I think we should keep the ticket open.

driusan avatar Feb 28 '19 14:02 driusan