-func (s *ContainerGatewaySuite) testContainerLog(c *check.C, viaGateway bool) {
- s.setupLogCollection(c, map[string]string{
- "stderr.txt": "hello world\n",
- "a/b/c/d.html": "<html></html>\n",
- })
- if !viaGateway {
- rootctx := ctrlctx.NewWithToken(s.ctx, s.cluster, s.cluster.SystemRootToken)
- txt, err := s.gw.LogCollection.MarshalManifest(".")
- c.Assert(err, check.IsNil)
- coll, err := s.localdb.CollectionCreate(rootctx, arvados.CreateOptions{
- Attrs: map[string]interface{}{
- "manifest_text": txt,
- }})
- c.Assert(err, check.IsNil)
- _, err = s.localdb.ContainerUpdate(rootctx, arvados.UpdateOptions{
- UUID: s.ctrUUID,
- Attrs: map[string]interface{}{
- "log": coll.PortableDataHash,
- "gateway_address": "",
- }})
- c.Assert(err, check.IsNil)
- // gateway_address="" above already ensures localdb
- // can't circumvent the keep-web proxy test by getting
- // content from the container gateway; this is just
- // extra insurance.
- s.gw.LogCollection = nil
- }