(t *testing.T, name string)
| 271 | } |
| 272 | |
| 273 | func (w *World) PutFile(t *testing.T, name string) blob.Ref { |
| 274 | out := MustRunCmd(t, w.Cmd("pk-put", "file", name)) |
| 275 | br, ok := blob.Parse(strings.TrimSpace(out)) |
| 276 | if !ok { |
| 277 | t.Fatalf("Expected blobref in pk-put stdout; got %q", out) |
| 278 | } |
| 279 | return br |
| 280 | } |
| 281 | |
| 282 | func (w *World) Cmd(binary string, args ...string) *exec.Cmd { |
| 283 | return w.CmdWithEnv(binary, os.Environ(), args...) |