https://codereview.appspot.com/53210044/diff/60001/state/apiserver/client/client_test.go#newcode1828
state/apiserver/client/client_test.go:1828: storage, err :=
apiserver.GetEnvironStorage(s.State)
On 2014/01/28 12:00:32, fwereade wrote:
> ah, ok, you can't put it in export_test. Hmm. I think I'd maybe prefer
it if
> this were accessed via the environ on the test, but I'm not sure of
the
> tradeoffs -- I'll leave it to your judgment.
If we reach this point we know it's not a placeholder and there's no
document for this charm URL. Not setting Placeholder: false here works,
because it's the default value. So it's OK I think.
Please take a look.
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/apiserver /charms. go /charms. go (right):
File state/apiserver
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/apiserver /charms. go#newcode229 /charms. go:229: func GetEnvironStora ge(st *state.State)
state/apiserver
(storage.Storage, error) {
On 2014/01/28 12:00:32, fwereade wrote:
> maybe put this in export_test rather than growing the interface here?
It was there, but I needed it in two places. I'll put it in
environs/testing.
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/apiserver /client/ client_ test.go /client/ client_ test.go (right):
File state/apiserver
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/apiserver /client/ client_ test.go# newcode1828 /client/ client_ test.go: 1828: storage, err := GetEnvironStora ge(s.State)
state/apiserver
apiserver.
On 2014/01/28 12:00:32, fwereade wrote:
> ah, ok, you can't put it in export_test. Hmm. I think I'd maybe prefer
it if
> this were accessed via the environ on the test, but I'm not sure of
the
> tradeoffs -- I'll leave it to your judgment.
I'll put it in environs/testing.
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/state. go
File state/state.go (right):
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/state. go#newcode480
state/state.go:480: what := D{{"_id", curl}, {"placeholder", false},
{"pendingupload", false}}
On 2014/01/28 12:00:32, fwereade wrote:
> Yeah, these bits do need to be fixed. Sorry, but they *will* break
stuff.
Done.
https:/ /codereview. appspot. com/53210044/ diff/60001/ state/state. go#newcode625
state/state.go:625: Insert: uploadedCharm,
On 2014/01/28 12:00:32, fwereade wrote:
> Don't we still need to deal with a placeholder here?
If we reach this point we know it's not a placeholder and there's no
document for this charm URL. Not setting Placeholder: false here works,
because it's the default value. So it's OK I think.
https:/ /codereview. appspot. com/53210044/ diff/60001/ utils/trivial. go
File utils/trivial.go (right):
https:/ /codereview. appspot. com/53210044/ diff/60001/ utils/trivial. go#newcode127 go:127: func GetSHA256(source io.Reader) (string, int64,
utils/trivial.
error) {
On 2014/01/28 12:00:32, fwereade wrote:
> ReadSHA256?
Done.
https:/ /codereview. appspot. com/53210044/ diff/60001/ utils/trivial. go#newcode139 go:139: func GetFileSHA256( filename string) (string,
utils/trivial.
int64, error) {
On 2014/01/28 12:00:32, fwereade wrote:
> ReadFileSHA256?
Done.
https:/ /codereview. appspot. com/53210044/ diff/60001/ utils/trivial. go#newcode146 go:146: }
utils/trivial.
On 2014/01/28 12:00:32, fwereade wrote:
> Also, please test these. Not quite trivial enough to be skippable IMO.
Done.
https:/ /codereview. appspot. com/53210044/