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
d6606a6a
Commit
d6606a6a
authored
Aug 15, 2016
by
Timothy St. Clair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
etcd3 validation showed that several unit tests that depend on apiserver being fully
stood up should be integration tests, not unit tests.
parent
ff9980e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
.linted_packages
hack/.linted_packages
+3
-0
discoverysummarizer_test.go
...tegration/discoverysummarizer/discoverysummarizer_test.go
+3
-2
apiserver_test.go
test/integration/examples/apiserver_test.go
+3
-2
server_test.go
test/integration/federation/server_test.go
+2
-1
No files found.
hack/.linted_packages
View file @
d6606a6a
...
@@ -200,3 +200,6 @@ test/soak/serve_hostnames
...
@@ -200,3 +200,6 @@ test/soak/serve_hostnames
third_party/forked/golang/expansion
third_party/forked/golang/expansion
pkg/util/maps
pkg/util/maps
pkg/volume/quobyte
pkg/volume/quobyte
test/integration/discoverysummarizer
test/integration/examples
test/integration/federation
cmd/kubernetes-discovery
/discoverysummarizer/discoverysummarizer_test.go
→
test/integration
/discoverysummarizer/discoverysummarizer_test.go
View file @
d6606a6a
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"testing"
"testing"
"time"
"time"
"k8s.io/kubernetes/cmd/kubernetes-discovery/discoverysummarizer"
"k8s.io/kubernetes/examples/apiserver"
"k8s.io/kubernetes/examples/apiserver"
)
)
...
@@ -46,10 +47,10 @@ func testResponse(t *testing.T, serverURL, path string, expectedStatusCode int)
...
@@ -46,10 +47,10 @@ func testResponse(t *testing.T, serverURL, path string, expectedStatusCode int)
}
}
func
runDiscoverySummarizer
(
t
*
testing
.
T
)
string
{
func
runDiscoverySummarizer
(
t
*
testing
.
T
)
string
{
configFilePath
:=
"../config.json"
configFilePath
:=
"../
../../cmd/kubernetes-discovery/
config.json"
port
:=
"9090"
port
:=
"9090"
serverURL
:=
"http://localhost:"
+
port
serverURL
:=
"http://localhost:"
+
port
s
,
err
:=
NewDiscoverySummarizer
(
configFilePath
)
s
,
err
:=
discoverysummarizer
.
NewDiscoverySummarizer
(
configFilePath
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v
\n
"
,
err
)
t
.
Errorf
(
"unexpected error: %v
\n
"
,
err
)
}
}
...
...
examples/apiserver
/apiserver_test.go
→
test/integration/examples
/apiserver_test.go
View file @
d6606a6a
...
@@ -27,10 +27,11 @@ import (
...
@@ -27,10 +27,11 @@ import (
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1"
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"k8s.io/kubernetes/examples/apiserver"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
)
)
var
serverIP
=
fmt
.
Sprintf
(
"http://localhost:%d"
,
InsecurePort
)
var
serverIP
=
fmt
.
Sprintf
(
"http://localhost:%d"
,
apiserver
.
InsecurePort
)
var
groupVersion
=
v1
.
SchemeGroupVersion
var
groupVersion
=
v1
.
SchemeGroupVersion
...
@@ -41,7 +42,7 @@ var groupVersionForDiscovery = unversioned.GroupVersionForDiscovery{
...
@@ -41,7 +42,7 @@ var groupVersionForDiscovery = unversioned.GroupVersionForDiscovery{
func
TestRun
(
t
*
testing
.
T
)
{
func
TestRun
(
t
*
testing
.
T
)
{
go
func
()
{
go
func
()
{
if
err
:=
Run
(
NewServerRunOptions
());
err
!=
nil
{
if
err
:=
apiserver
.
Run
(
apiserver
.
NewServerRunOptions
());
err
!=
nil
{
t
.
Fatalf
(
"Error in bringing up the server: %v"
,
err
)
t
.
Fatalf
(
"Error in bringing up the server: %v"
,
err
)
}
}
}()
}()
...
...
federation/cmd/federation-apiserver/app
/server_test.go
→
test/integration/federation
/server_test.go
View file @
d6606a6a
...
@@ -29,6 +29,7 @@ import (
...
@@ -29,6 +29,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
fed_v1b1
"k8s.io/kubernetes/federation/apis/federation/v1beta1"
fed_v1b1
"k8s.io/kubernetes/federation/apis/federation/v1beta1"
"k8s.io/kubernetes/federation/cmd/federation-apiserver/app"
"k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options"
"k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/api/v1"
...
@@ -90,7 +91,7 @@ func TestRun(t *testing.T) {
...
@@ -90,7 +91,7 @@ func TestRun(t *testing.T) {
s
.
ServiceClusterIPRange
=
*
ipNet
s
.
ServiceClusterIPRange
=
*
ipNet
s
.
StorageConfig
.
ServerList
=
[]
string
{
"http://localhost:2379"
}
s
.
StorageConfig
.
ServerList
=
[]
string
{
"http://localhost:2379"
}
go
func
()
{
go
func
()
{
if
err
:=
Run
(
s
);
err
!=
nil
{
if
err
:=
app
.
Run
(
s
);
err
!=
nil
{
t
.
Fatalf
(
"Error in bringing up the server: %v"
,
err
)
t
.
Fatalf
(
"Error in bringing up the server: %v"
,
err
)
}
}
}()
}()
...
...
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