juju/juju — pull request #370 by binary132 (2014-07-23 09:13:30+00:00)
Title: WIP: actions-get

This is mostly ready to go, but I'm repeatedly getting a very strange error. It appears that the context Write method is marshaling a simple JSON object in YAML format, even with the flag `--format=json` passed.

```
[bodie@sol-invictus:~/go/src/github.com/juju/juju on actions-get-dev]
% go test ./worker/uniter/jujuc/... -gocheck.f "ActionGetSuite.Test.*"

----------------------------------------------------------------------
FAIL: action-get_test.go:26: ActionGetSuite.TestActionGet

test 0: args: []string{}
test 1: args: []string{"--format=yaml"}
test 2: args: []string{"--format=json"}
test 3: args: []string{"foo"}
test 4: args: []string{"--format=yaml", "foo"}
test 5: args: []string{"--format=json", "foo"}
test 6: args: []string{"outfile.type"}
test 7: args: []string{"--format=yaml", "outfile.type"}
test 8: args: []string{"--format=json", "outfile.type"}
test 9: args: []string{"outfile.type.1"}
test 10: args: []string{"--format=yaml", "outfile.type.1"}
test 11: args: []string{"--format=json", "outfile.type.1"}
test 12: args: []string{}
test 13: args: []string{"--format=yaml"}
test 14: args: []string{"--format=json"}
Unexpected JSON error: "outfile: foo.bz2\n"
action-get_test.go:131:
c.Assert(err, gc.IsNil)
... value *json.SyntaxError = &json.SyntaxError{msg:"invalid character 'o' looking for beginning of value", Offset:1} ("invalid character 'o' looking for beginning of value")

OOPS: 2 passed, 1 FAILED
--- FAIL: TestPackage (0.00 seconds)
FAIL
FAIL github.com/juju/juju/worker/uniter/jujuc 0.098s
```

Any comments would be welcome!