Commit Graph

6 Commits

Author SHA1 Message Date
Akihiro Suda da7edb5f3c Fix pkg/streamformatter.TestJSONFormatProgress
The test was failing if the terminal column width is <= 110.

Addendum to #23113

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-05-31 09:09:06 +00:00
Yong Tang d17bb23ae6 Fix flaky test TestJSONFormatProgress (#21124)
In TestJSONFormatProgress, the progress string was used for comparison.
However, the progress string (progress.String()) uses time.Now().UTC()
to generate the timeLeftBox which is not a fixed value and cannot be
compared reliably.

This PR fixes the issue by stripping the timeLeftBox field before doing
the comparison.

This PR fixes #21124.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-03-14 16:00:12 +00:00
Aaron Lehmann 65370be888 Send push information to trust code out-of-band
The trust code used to parse the console output of `docker push` to
extract the digest, tag, and size information and determine what to
sign. This is fragile and might give an attacker control over what gets
signed if the attacker can find a way to influence what gets printed as
part of the push output.

This commit sends the push metadata out-of-band. It introduces an `Aux`
field in JSONMessage that can carry application-specific data alongside
progress updates. Instead of parsing formatted output, the client looks
in this field to get the digest, size, and tag from the push.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-08 10:57:50 -08:00
Antonio Murdaca 6b700bdaca Refactor pkg/stremformatter with custom constructors instead of passing a boolean
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-13 00:09:41 +02:00
Antonio Murdaca 1c89c6ea2f Add minor stylistic fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-16 21:22:32 +02:00
bobby abbott 0cd6c05d81 Fixes hacks from progressreader refactor
related to #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-25 18:21:02 -07:00