Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile
This commit is contained in:
18
pkg/can-go/internal/generate/file_test.go
Normal file
18
pkg/can-go/internal/generate/file_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package generate
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
)
|
||||
|
||||
func runTestInDir(t *testing.T, dir string) func() {
|
||||
// change working directory to project root
|
||||
wd, err := os.Getwd()
|
||||
assert.NilError(t, err)
|
||||
assert.NilError(t, os.Chdir(dir))
|
||||
return func() {
|
||||
assert.NilError(t, os.Chdir(wd))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user