Remove test/integration/* from hack/.golint_failures

This commit is contained in:
Eric Walker
2018-11-13 20:28:00 -07:00
parent 9fd7a4c2dc
commit 75df4dc04c
19 changed files with 115 additions and 105 deletions

View File

@@ -103,11 +103,13 @@ type MasterHolder struct {
M *master.Master
}
// SetMaster assigns the current master.
func (h *MasterHolder) SetMaster(m *master.Master) {
h.M = m
close(h.Initialized)
}
// DefaultOpenAPIConfig returns an openapicommon.Config initialized to default values.
func DefaultOpenAPIConfig() *openapicommon.Config {
openAPIConfig := genericapiserver.DefaultOpenAPIConfig(openapi.GetOpenAPIDefinitions, openapinamer.NewDefinitionNamer(legacyscheme.Scheme))
openAPIConfig.Info = &spec.Info{
@@ -237,7 +239,7 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
return m, s, closeFn
}
// Returns the master config appropriate for most integration tests.
// NewIntegrationTestMasterConfig returns the master config appropriate for most integration tests.
func NewIntegrationTestMasterConfig() *master.Config {
masterConfig := NewMasterConfig()
masterConfig.GenericConfig.PublicAddress = net.ParseIP("192.168.10.4")
@@ -249,7 +251,7 @@ func NewIntegrationTestMasterConfig() *master.Config {
return masterConfig
}
// Returns a basic master config.
// NewMasterConfig returns a basic master config.
func NewMasterConfig() *master.Config {
// This causes the integration tests to exercise the etcd
// prefix code, so please don't change without ensuring
@@ -336,6 +338,7 @@ func NewMasterConfig() *master.Config {
// CloseFunc can be called to cleanup the master
type CloseFunc func()
// RunAMaster starts a master with the provided config.
func RunAMaster(masterConfig *master.Config) (*master.Master, *httptest.Server, CloseFunc) {
if masterConfig == nil {
masterConfig = NewMasterConfig()
@@ -344,6 +347,7 @@ func RunAMaster(masterConfig *master.Config) (*master.Master, *httptest.Server,
return startMasterOrDie(masterConfig, nil, nil)
}
// RunAMasterUsingServer starts up a master using the provided config on the specified server.
func RunAMasterUsingServer(masterConfig *master.Config, s *httptest.Server, masterReceiver MasterReceiver) (*master.Master, *httptest.Server, CloseFunc) {
return startMasterOrDie(masterConfig, s, masterReceiver)
}