Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cfdea234
Commit
cfdea234
authored
Feb 05, 2018
by
alex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding benchmarks to envelop encryption integration tests
parent
1105751c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
testserver.go
cmd/kube-apiserver/app/testing/testserver.go
+12
-6
secrets_enveloping_test.go
test/integration/master/secrets_enveloping_test.go
+0
-0
No files found.
cmd/kube-apiserver/app/testing/testserver.go
View file @
cfdea234
...
@@ -21,7 +21,6 @@ import (
...
@@ -21,7 +21,6 @@ import (
"io/ioutil"
"io/ioutil"
"net"
"net"
"os"
"os"
"testing"
"time"
"time"
pflag
"github.com/spf13/pflag"
pflag
"github.com/spf13/pflag"
...
@@ -46,13 +45,20 @@ type TestServer struct {
...
@@ -46,13 +45,20 @@ type TestServer struct {
TmpDir
string
// Temp Dir used, by the apiserver
TmpDir
string
// Temp Dir used, by the apiserver
}
}
// Logger allows t.Testing and b.Testing to be passed to StartTestServer and StartTestServerOrDie
type
Logger
interface
{
Errorf
(
format
string
,
args
...
interface
{})
Fatalf
(
format
string
,
args
...
interface
{})
Logf
(
format
string
,
args
...
interface
{})
}
// StartTestServer starts a etcd server and kube-apiserver. A rest client config and a tear-down func,
// StartTestServer starts a etcd server and kube-apiserver. A rest client config and a tear-down func,
// and location of the tmpdir are returned.
// and location of the tmpdir are returned.
//
//
// Note: we return a tear-down func instead of a stop channel because the later will leak temporar
i
y
// Note: we return a tear-down func instead of a stop channel because the later will leak temporary
// files that becau
es
Golang testing's call to os.Exit will not give a stop channel go routine
// files that becau
se
Golang testing's call to os.Exit will not give a stop channel go routine
// enough time to remove temporar
i
y files.
// enough time to remove temporary files.
func
StartTestServer
(
t
*
testing
.
T
,
customFlags
[]
string
,
storageConfig
*
storagebackend
.
Config
)
(
result
TestServer
,
err
error
)
{
func
StartTestServer
(
t
Logger
,
customFlags
[]
string
,
storageConfig
*
storagebackend
.
Config
)
(
result
TestServer
,
err
error
)
{
// TODO : Remove TrackStorageCleanup below when PR
// TODO : Remove TrackStorageCleanup below when PR
// https://github.com/kubernetes/kubernetes/pull/50690
// https://github.com/kubernetes/kubernetes/pull/50690
...
@@ -137,7 +143,7 @@ func StartTestServer(t *testing.T, customFlags []string, storageConfig *storageb
...
@@ -137,7 +143,7 @@ func StartTestServer(t *testing.T, customFlags []string, storageConfig *storageb
}
}
// StartTestServerOrDie calls StartTestServer t.Fatal if it does not succeed.
// StartTestServerOrDie calls StartTestServer t.Fatal if it does not succeed.
func
StartTestServerOrDie
(
t
*
testing
.
T
,
flags
[]
string
,
storageConfig
*
storagebackend
.
Config
)
*
TestServer
{
func
StartTestServerOrDie
(
t
Logger
,
flags
[]
string
,
storageConfig
*
storagebackend
.
Config
)
*
TestServer
{
result
,
err
:=
StartTestServer
(
t
,
flags
,
storageConfig
)
result
,
err
:=
StartTestServer
(
t
,
flags
,
storageConfig
)
if
err
==
nil
{
if
err
==
nil
{
...
...
test/integration/master/secrets_enveloping_test.go
View file @
cfdea234
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment