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
18c1eb2d
Commit
18c1eb2d
authored
Feb 11, 2016
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
turn on and off watch cache in integration test
parent
34447ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
integration.go
cmd/integration/integration.go
+4
-0
test-integration.sh
hack/test-integration.sh
+6
-2
No files found.
cmd/integration/integration.go
View file @
18c1eb2d
...
...
@@ -77,6 +77,7 @@ var (
fakeDocker2
=
dockertools
.
NewFakeDockerClient
()
// Limit the number of concurrent tests.
maxConcurrency
int
watchCache
bool
longTestTimeout
=
time
.
Second
*
500
...
...
@@ -169,6 +170,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string
masterConfig
.
ReadWritePort
=
portNumber
masterConfig
.
PublicAddress
=
hostIP
masterConfig
.
CacheTimeout
=
2
*
time
.
Second
masterConfig
.
EnableWatchCache
=
watchCache
// Create a master and install handlers into mux.
m
,
err
:=
master
.
New
(
masterConfig
)
...
...
@@ -961,6 +963,8 @@ type testFunc func(*client.Client)
func
addFlags
(
fs
*
pflag
.
FlagSet
)
{
fs
.
IntVar
(
&
maxConcurrency
,
"max-concurrency"
,
-
1
,
"Maximum number of tests to be run simultaneously. Unlimited if set to negative."
)
fs
.
BoolVar
(
&
watchCache
,
"watch-cache"
,
false
,
"Turn on watch cache on API server."
)
}
func
main
()
{
...
...
hack/test-integration.sh
View file @
18c1eb2d
...
...
@@ -55,10 +55,14 @@ runTests() {
KUBE_API_VERSIONS
=
"v1,extensions/v1beta1"
\
"
${
KUBE_ROOT
}
/hack/test-go.sh"
test
/integration
kube::log::status
"Running integration test scenario"
kube::log::status
"Running integration test scenario with watch cache on"
KUBE_API_VERSIONS
=
"v1,extensions/v1beta1"
KUBE_TEST_API_VERSIONS
=
"
$1
"
"
${
KUBE_OUTPUT_HOSTBIN
}
/integration"
--v
=
${
LOG_LEVEL
}
\
--max-concurrency
=
"
${
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY
}
"
--watch-cache
=
true
kube::log::status
"Running integration test scenario with watch cache off"
KUBE_API_VERSIONS
=
"v1,extensions/v1beta1"
KUBE_TEST_API_VERSIONS
=
"
$1
"
"
${
KUBE_OUTPUT_HOSTBIN
}
/integration"
--v
=
${
LOG_LEVEL
}
\
--max-concurrency
=
"
${
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY
}
"
--max-concurrency
=
"
${
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY
}
"
--watch-cache
=
false
cleanup
}
...
...
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