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

tests fail when used with go modules #108

Open
hdonnay opened this issue Sep 6, 2018 · 2 comments
Open

tests fail when used with go modules #108

hdonnay opened this issue Sep 6, 2018 · 2 comments

Comments

@hdonnay
Copy link

hdonnay commented Sep 6, 2018

Both the main procfs package and the xfs package fail on my machine.
Here's a reproducer:

#!/bin/sh
set -ex
t=$(mktemp -d)
trap 'rm -r $t' EXIT
cd $t
cat >ex.go <<.
package main

import (
	_ "github.com/prometheus/procfs"
)

func main() {
	println("example")
}
.
go mod init example
go test all

The tests should automatically unpack fixtures.ttar if they need the files.

@grobie
Copy link
Member

grobie commented Sep 6, 2018

Happy to review a PR to support go modules, if it's simple. For everything more involved I'd wait until go modules have matured.

@hdonnay
Copy link
Author

hdonnay commented Sep 6, 2018

That's fair. I'll submit something once golang/go#27492 has an answer and there's a supported place/way to create files during tests.

bobrik pushed a commit to bobrik/procfs that referenced this issue Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants