diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-11-20 15:09:04 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-20 15:10:18 -0800 |
commit | f894610c572976026f4cf6841f4095718827e4f8 (patch) | |
tree | 2da8b097e5485dc5df91ef63b860da260e3fab41 /runsc/console | |
parent | 8b314b0bf402da58f90ccaac852a880d375f0885 (diff) |
Use math.Rand to generate a random test container id.
We were relying on time.UnixNano, but that was causing collisions.
Now we generate 20 bytes of entropy from rand.Read, and base32-encode it to get
a valid container id.
PiperOrigin-RevId: 222313867
Change-Id: Iaeea9b9582d36de55f9f02f55de6a5de3f739371
Diffstat (limited to 'runsc/console')
0 files changed, 0 insertions, 0 deletions