accounts: use local directory for bind tests

Because of go modules, it's easiest to create tests in local
subdirectory, to ensure that correct version of dependencies is used.
This commit is contained in:
Tomasz Zdybał 2019-09-12 12:23:39 +02:00
parent fbba6b2ccc
commit 60e0681806
No known key found for this signature in database
GPG key ID: F157D3BD6E2EED66

View file

@ -1384,17 +1384,13 @@ func TestGolangBindings(t *testing.T) {
if !common.FileExist(gocmd) {
t.Skip("go sdk not found for testing")
}
// Create a temporary workspace for the test suite
ws, err := ioutil.TempDir("", "")
if err != nil {
t.Fatalf("failed to create temporary workspace: %v", err)
}
defer os.RemoveAll(ws)
pkg := filepath.Join(ws, "bindtest")
if err = os.MkdirAll(pkg, 0700); err != nil {
pkg := "bindtest"
if err := os.MkdirAll(pkg, 0700); err != nil {
t.Fatalf("failed to create package: %v", err)
}
defer os.RemoveAll(pkg)
// Generate the test suite for all the contracts
for i, tt := range bindTests {
var types []string