You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cadaver_test.go
    path of file: ./repos/arvados/services/keep-web
    
    the code of the file until where you have to start completion: // Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0

package keepweb

import (
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"

	"git.arvados.org/arvados.git/sdk/go/arvados"
	"git.arvados.org/arvados.git/sdk/go/arvadostest"
	check "gopkg.in/check.v1"
)

func (s *IntegrationSuite) TestCadaverHTTPAuth(c *check.C) {
	s.testCadaver(c, arvadostest.ActiveToken, func(newCollection arvados.Collection) (string, string, string) {
		r := "/c=" + arvadostest.FooAndBarFilesInDirUUID + "/"
		w := "/c=" + newCollection.UUID + "/"
		pdh := "/c=" + strings.Replace(arvadostest.FooAndBarFilesInDirPDH, "+", "-", -1) + "/"
		return r, w, pdh
	}, nil)
}

func (s *IntegrationSuite) TestCadaverPathAuth(c *check.C) {
	s.testCadaver(c, "", func(newCollection arvados.Collection) (string, string, string) {
		r := "/c=" + arvadostest.FooAn
    
func (s *IntegrationSuite) runCadaver(c *check.C, password, path, stdin string) string {
	tempdir, err := ioutil.TempDir("", "keep-web-test-")
	c.Assert(err, check.IsNil)
	defer os.RemoveAll(tempdir)

	cmd := exec.Command("cadaver", s.testServer.URL+path)
	if password != "" {
		// cadaver won't try username/password authentication
		// unless the server responds 401 to an
		// unauthenticated request, which it only does in
		// AttachmentOnlyHost, TrustAllContent, and
		// per-collection vhost cases.
		s.handler.Cluster.Services.WebDAVDownload.ExternalURL.Host = s.testServer.URL[7:]

		cmd.Env = append(os.Environ(), "HOME="+tempdir)
		f, err := os.OpenFile(filepath.Join(tempdir, ".netrc"), os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
		c.Assert(err, check.IsNil)
		_, err = fmt.Fprintf(f, "default login none password %s\n", password)
		c.Assert(err, check.IsNil)
		c.Assert(f.Close(), check.IsNil)
	}
	cmd.Stdin = bytes.NewBufferString(stdin)
	stdout, err := cmd.StdoutPipe()
	c.Assert(err, check.Equals, nil)
	cmd.Stderr = cmd.Stdout
	go cmd.Start()

	var buf bytes.Buffer
	_, err = io.Copy(&buf, stdout)
	c.Check(err, check.Equals, nil)
	err = cmd.Wait()
	c.Check(err, check.Equals, nil)
	return buf.String()
}