Commit 02ad4391 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #50727 from CaoShuFeng/leaked_socket_file

Automatic merge from submit-queue (batch tested with PRs 50692, 50727) remove leaked socket file after unit test Before this change: ``` $ make test WHAT=k8s.io/kubernetes/pkg/master +++ [0816 11:19:03] Running tests without code coverage ok k8s.io/kubernetes/pkg/master 27.953s $ find -type s ./pkg/master/127.0.0.1:2100324511 ./pkg/master/127.0.0.1:2100424511 ./pkg/master/localhost:8235197834378812860 ./pkg/master/localhost:82351978343788128600 ./pkg/master/127.0.0.1:2100524511 ./pkg/master/127.0.0.1:2100624511 ./pkg/master/localhost:1155389051645284688 ./pkg/master/localhost:11553890516452846880 ``` **Release note**: ``` NONE ```
parents 7b264382 1bb55993
...@@ -120,7 +120,9 @@ func setUp(t *testing.T) (*etcdtesting.EtcdTestServer, Config, *assert.Assertion ...@@ -120,7 +120,9 @@ func setUp(t *testing.T) (*etcdtesting.EtcdTestServer, Config, *assert.Assertion
// their various strategies properly wired up. This surfaced as a bug where strategies defined Export functions, but // their various strategies properly wired up. This surfaced as a bug where strategies defined Export functions, but
// they were never used outside of unit tests because the export strategies were not assigned inside the Store. // they were never used outside of unit tests because the export strategies were not assigned inside the Store.
func TestLegacyRestStorageStrategies(t *testing.T) { func TestLegacyRestStorageStrategies(t *testing.T) {
_, _, masterCfg, _ := newMaster(t) _, etcdserver, masterCfg, _ := newMaster(t)
defer etcdserver.Terminate(t)
storageProvider := corerest.LegacyRESTStorageProvider{ storageProvider := corerest.LegacyRESTStorageProvider{
StorageFactory: masterCfg.StorageFactory, StorageFactory: masterCfg.StorageFactory,
ProxyTransport: masterCfg.ProxyTransport, ProxyTransport: masterCfg.ProxyTransport,
...@@ -154,7 +156,9 @@ func TestLegacyRestStorageStrategies(t *testing.T) { ...@@ -154,7 +156,9 @@ func TestLegacyRestStorageStrategies(t *testing.T) {
} }
func TestCertificatesRestStorageStrategies(t *testing.T) { func TestCertificatesRestStorageStrategies(t *testing.T) {
_, _, masterCfg, _ := newMaster(t) _, etcdserver, masterCfg, _ := newMaster(t)
defer etcdserver.Terminate(t)
certStorageProvider := certificatesrest.RESTStorageProvider{} certStorageProvider := certificatesrest.RESTStorageProvider{}
apiGroupInfo, _ := certStorageProvider.NewRESTStorage(masterCfg.APIResourceConfigSource, masterCfg.GenericConfig.RESTOptionsGetter) apiGroupInfo, _ := certStorageProvider.NewRESTStorage(masterCfg.APIResourceConfigSource, masterCfg.GenericConfig.RESTOptionsGetter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment