}
}
// Some keys are always preserved, even if not requested
- for _, k := range []string{"kind", "writable_by"} {
+ for _, k := range []string{"etag", "kind", "writable_by"} {
if v, ok := orig[k]; ok {
selected[k] = v
}
c.Check(rr.Code, check.Equals, http.StatusOK)
c.Check(resp["kind"], check.Equals, "arvados#container")
+ c.Check(resp["etag"], check.FitsTypeOf, "")
+ c.Check(resp["etag"], check.Not(check.Equals), "")
c.Check(resp["uuid"], check.HasLen, 27)
c.Check(resp["command"], check.HasLen, 2)
c.Check(resp["mounts"], check.IsNil)
// Container is an arvados#container resource.
type Container struct {
UUID string `json:"uuid"`
+ Etag string `json:"etag"`
CreatedAt time.Time `json:"created_at"`
ModifiedByClientUUID string `json:"modified_by_client_uuid"`
ModifiedByUserUUID string `json:"modified_by_user_uuid"`
// User is an arvados#user record
type User struct {
UUID string `json:"uuid"`
+ Etag string `json:"etag"`
IsActive bool `json:"is_active"`
IsAdmin bool `json:"is_admin"`
Username string `json:"username"`