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

BuildSpecs is inconsistent #122

Open
Stebalien opened this issue Jul 31, 2019 · 0 comments
Open

BuildSpecs is inconsistent #122

Stebalien opened this issue Jul 31, 2019 · 0 comments

Comments

@Stebalien
Copy link
Member

It creates directories on disk but then doesn't actually write the spec config to disk. It should either do both or none.

iptb/testbed/testbed.go

Lines 71 to 91 in 9487788

func BuildSpecs(base string, count int, typ string, attrs map[string]string) ([]*NodeSpec, error) {
var specs []*NodeSpec
for i := 0; i < count; i++ {
dir := path.Join(base, fmt.Sprint(i))
if err := os.MkdirAll(dir, 0775); err != nil {
return nil, err
}
spec := &NodeSpec{
Type: typ,
Dir: dir,
Attrs: attrs,
}
specs = append(specs, spec)
}
return specs, nil
}

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

1 participant