commit | e2640f33c7fda2c3b6bd13f82f390717e613b5a8 | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Tue Nov 24 17:41:44 2015 -0800 |
committer | Todd Wang <toddw@google.com> | Tue Nov 24 17:41:44 2015 -0800 |
tree | 2074a9282e169ac14d198ee994cbc729fab6dee9 | |
parent | 338aca414b9ff59d2ec8ba80ac815572dda1bcc9 [diff] |
jiri: Simplify usage and impl of jiritest.NewFakeJiriRoot The previous usage of NewFakeJiriRoot was annoying; you'd need to check for errors, then defer a function to perform cleanup, which also needed error checking. The new implementation calls t.Fatal to fail the test if any errors occur. This makes the usage a simple two lines: fake, cleanup := jiritest.NewFakeJiriRoot(t) defer cleanup() Also replaced some uses of jiritest.NewX_DeprecatedEnv with calls to NewFakeJiriRoot. I've replaced all the "easy" ones; all of the remaining ones rely on the profiles logic, which needs cleanup of its own before more progress can be made. Here are the files with remaining uses of NewX_DeprecatedEnv, because of their usage of profiles: jiri/profiles/env_test.go jiri/profiles/manifest_test.go x/devtools/jiri-test/internal/test/go_test.go x/devtools/jiri-api/api_test.go x/devtools/jiri-go/go_test.go x/devtools/gologcop/gologcop_test.go MultiPart: 1/2 Change-Id: I3bb1ad1e0e688c5b0f789efdc863e150c49028b3
“Jiri integrates repositories intelligently”
This repository implements the Jiri repository management tool.
For documentation, see http://godoc.org/v.io/jiri