vcstest

Imports

Imports #

"cmd/go/internal/vcs"
"cmd/go/internal/vcweb"
"cmd/go/internal/web/intercept"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"fmt"
"internal/testenv"
"io"
"log"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"testing"

Constants & Variables

Hosts var #

var Hosts = []string{...}

Structs

Server struct #

type Server struct {
vcweb *vcweb.Server
workDir string
HTTP *httptest.Server
HTTPS *httptest.Server
}

Functions

Close method #

func (srv *Server) Close() error

NewServer function #

NewServer returns a new test-local vcweb server that serves VCS requests for modules with paths that begin with "vcs-test.golang.org" using the scripts in cmd/go/testdata/vcstest.

func NewServer() (srv *Server, err error)

TLSClient function #

TLSClient returns an http.Client that can talk to the httptest.Server whose certificate is written to the given file path.

func TLSClient(certFile string) (*http.Client, error)

WriteCertificateFile method #

func (srv *Server) WriteCertificateFile() (string, error)

Generated with Arrow