Remove test/integration/* from hack/.golint_failures
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -31,12 +31,14 @@ const (
|
||||
retries = 5
|
||||
)
|
||||
|
||||
// IntegrationTestNodePreparer holds configuration information for the test node preparer.
|
||||
type IntegrationTestNodePreparer struct {
|
||||
client clientset.Interface
|
||||
countToStrategy []testutils.CountToStrategy
|
||||
nodeNamePrefix string
|
||||
}
|
||||
|
||||
// NewIntegrationTestNodePreparer creates an IntegrationTestNodePreparer configured with defaults.
|
||||
func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy []testutils.CountToStrategy, nodeNamePrefix string) testutils.TestNodePreparer {
|
||||
return &IntegrationTestNodePreparer{
|
||||
client: client,
|
||||
@@ -45,6 +47,7 @@ func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy
|
||||
}
|
||||
}
|
||||
|
||||
// PrepareNodes prepares countToStrategy test nodes.
|
||||
func (p *IntegrationTestNodePreparer) PrepareNodes() error {
|
||||
numNodes := 0
|
||||
for _, v := range p.countToStrategy {
|
||||
@@ -96,6 +99,7 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CleanupNodes deletes existing test nodes.
|
||||
func (p *IntegrationTestNodePreparer) CleanupNodes() error {
|
||||
nodes := e2eframework.GetReadySchedulableNodesOrDie(p.client)
|
||||
for i := range nodes.Items {
|
||||
|
||||
@@ -39,6 +39,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/master"
|
||||
)
|
||||
|
||||
// TestServerSetup holds configuration information for a kube-apiserver test server.
|
||||
type TestServerSetup struct {
|
||||
ModifyServerRunOptions func(*options.ServerRunOptions)
|
||||
ModifyServerConfig func(*master.Config)
|
||||
|
||||
@@ -33,6 +33,7 @@ const (
|
||||
currentPodInfraContainerImageVersion = "3.1"
|
||||
)
|
||||
|
||||
// CreateTestingNamespace creates a namespace for testing.
|
||||
func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *testing.T) *v1.Namespace {
|
||||
// TODO: Create a namespace with a given basename.
|
||||
// Currently we neither create the namespace nor delete all of its contents at the end.
|
||||
@@ -45,6 +46,7 @@ func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *test
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteTestingNamespace is currently a no-op function.
|
||||
func DeleteTestingNamespace(ns *v1.Namespace, apiserver *httptest.Server, t *testing.T) {
|
||||
// TODO: Remove all resources from a given namespace once we implement CreateTestingNamespace.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user