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
a1481f5a
Commit
a1481f5a
authored
Sep 12, 2016
by
jayunit100
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component tests as integration-tests with short option.
parent
dbdaf2c2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
7 deletions
+25
-7
test-integration.sh
hack/make-rules/test-integration.sh
+2
-1
etcd_utils.go
test/integration/framework/etcd_utils.go
+11
-3
README.md
test/integration/scheduler_perf/README.md
+3
-0
scheduler_bench_test.go
test/integration/scheduler_perf/scheduler_bench_test.go
+0
-0
scheduler_test.go
test/integration/scheduler_perf/scheduler_test.go
+6
-0
test-performance.sh
test/integration/scheduler_perf/test-performance.sh
+2
-2
util.go
test/integration/scheduler_perf/util.go
+1
-1
No files found.
hack/make-rules/test-integration.sh
View file @
a1481f5a
...
...
@@ -42,6 +42,7 @@ kube::test::find_integration_test_dirs() {
cd
${
KUBE_ROOT
}
find
test
/integration/
${
1
-
}
-name
'*_test.go'
-print0
\
| xargs
-0n1
dirname
\
|
uniq
\
|
sort
-u
)
}
...
...
@@ -61,7 +62,7 @@ runTests() {
# KUBE_RACE="-race"
make
-C
"
${
KUBE_ROOT
}
"
test
\
WHAT
=
"
$(
kube::test::find_integration_test_dirs
${
2
-
}
|
paste
-sd
' '
-
)
"
\
KUBE_GOFLAGS
=
"
${
KUBE_GOFLAGS
:-}
-tags 'integration no-docker'"
\
KUBE_GOFLAGS
=
"
${
KUBE_GOFLAGS
:-}
-
short=true -
tags 'integration no-docker'"
\
KUBE_TEST_ARGS
=
"
${
KUBE_TEST_ARGS
:-}
--vmodule=garbage*collector*=6 --alsologtostderr=true"
\
KUBE_RACE
=
""
\
KUBE_TIMEOUT
=
"
${
KUBE_TIMEOUT
}
"
\
...
...
test/integration/framework/etcd_utils.go
View file @
a1481f5a
...
...
@@ -30,9 +30,8 @@ import (
// If you need to start an etcd instance by hand, you also need to insert a key
// for this check to pass (*any* key will do, eg:
//curl -L http://127.0.0.1:2379/v2/keys/message -XPUT -d value="Hello world").
func
init
()
{
RequireEtcd
()
}
var
testing_etcd
=
false
func
GetEtcdURLFromEnv
()
string
{
url
:=
env
.
GetEnvAsStringOrFallback
(
"KUBE_INTEGRATION_ETCD_URL"
,
"http://127.0.0.1:2379"
)
...
...
@@ -41,6 +40,10 @@ func GetEtcdURLFromEnv() string {
}
func
NewEtcdClient
()
etcd
.
Client
{
// gaurded to avoid infinite recursion, check etcd.
if
testing_etcd
{
RequireEtcd
()
}
cfg
:=
etcd
.
Config
{
Endpoints
:
[]
string
{
GetEtcdURLFromEnv
()},
}
...
...
@@ -52,9 +55,14 @@ func NewEtcdClient() etcd.Client {
}
func
RequireEtcd
()
{
testing_etcd
=
true
defer
func
()
{
testing_etcd
=
false
}()
if
_
,
err
:=
etcd
.
NewKeysAPI
(
NewEtcdClient
())
.
Get
(
context
.
TODO
(),
"/"
,
nil
);
err
!=
nil
{
glog
.
Fatalf
(
"unable to connect to etcd for testing: %v"
,
err
)
}
}
func
WithEtcdKey
(
f
func
(
string
))
{
...
...
test/
component/scheduler/
perf/README.md
→
test/
integration/scheduler_
perf/README.md
View file @
a1481f5a
...
...
@@ -73,3 +73,6 @@ cd kubernetes/test/component/scheduler/perf
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
[

]()
test/
component/scheduler/
perf/scheduler_bench_test.go
→
test/
integration/scheduler_
perf/scheduler_bench_test.go
View file @
a1481f5a
File moved
test/
component/scheduler/
perf/scheduler_test.go
→
test/
integration/scheduler_
perf/scheduler_test.go
View file @
a1481f5a
...
...
@@ -24,11 +24,17 @@ import (
// TestSchedule100Node3KPods schedules 3k pods on 100 nodes.
func
TestSchedule100Node3KPods
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Skip
(
"Skipping because we want to run short tests"
)
}
schedulePods
(
100
,
3000
)
}
// TestSchedule1000Node30KPods schedules 30k pods on 1000 nodes.
func
TestSchedule1000Node30KPods
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Skip
(
"Skipping because we want to run short tests"
)
}
schedulePods
(
1000
,
30000
)
}
...
...
test/
component/scheduler/
perf/test-performance.sh
→
test/
integration/scheduler_
perf/test-performance.sh
View file @
a1481f5a
...
...
@@ -41,9 +41,9 @@ kube::log::status "performance test start"
# theoretically it has less variance.
if
${
RUN_BENCHMARK
:-
false
}
;
then
go
test
-c
-o
"perf.test"
"./perf.test"
-test
.bench
=
.
-test
.run
=
xxxx
-test
.cpuprofile
=
prof.out
"./perf.test"
-test
.bench
=
.
-test
.run
=
xxxx
-test
.cpuprofile
=
prof.out
-test
.short
=
false
kube::log::status
"benchmark tests finished"
fi
# Running density tests. It might take a long time.
go
test
-test
.run
=
.
-test
.timeout
=
60m
go
test
-test
.run
=
.
-test
.timeout
=
60m
-test
.short
=
false
kube::log::status
"density tests finished"
test/
component/scheduler/
perf/util.go
→
test/
integration/scheduler_
perf/util.go
View file @
a1481f5a
...
...
@@ -44,7 +44,7 @@ import (
// Notes on rate limiter:
// - client rate limit is set to 5000.
func
mustSetupScheduler
()
(
schedulerConfigFactory
*
factory
.
ConfigFactory
,
destroyFunc
func
())
{
framework
.
DeleteAllEtcdKeys
()
//
framework.DeleteAllEtcdKeys()
var
m
*
master
.
Master
masterConfig
:=
framework
.
NewIntegrationTestMasterConfig
()
...
...
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