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
3b207306
Commit
3b207306
authored
Dec 14, 2016
by
aaronxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spell check for test/*
parent
9705bb72
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
16 additions
and
16 deletions
+16
-16
generate-docs.sh
hack/generate-docs.sh
+1
-1
local-up-discovery.sh
hack/local-up-discovery.sh
+1
-1
update-generated-protobuf-dockerized.sh
hack/update-generated-protobuf-dockerized.sh
+1
-1
verify-symbols.sh
hack/verify-symbols.sh
+1
-1
garbage_collector_test.go
test/integration/garbagecollector/garbage_collector_test.go
+2
-2
scheduler_test.go
test/integration/scheduler/scheduler_test.go
+4
-4
scheduler_test.go
test/integration/scheduler_perf/scheduler_test.go
+1
-1
thirdparty_test.go
test/integration/thirdparty/thirdparty_test.go
+1
-1
persistent_volumes_test.go
test/integration/volume/persistent_volumes_test.go
+3
-3
run-e2e-tests.sh
test/kubemark/run-e2e-tests.sh
+1
-1
No files found.
hack/generate-docs.sh
View file @
3b207306
...
@@ -43,7 +43,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
...
@@ -43,7 +43,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
# remove all of the old docs
# remove all of the old docs
kube::util::remove-gen-docs
kube::util::remove-gen-docs
#
C
opy fresh docs into the repo.
#
c
opy fresh docs into the repo.
# the shopt is so that we get .generated_docs from the glob.
# the shopt is so that we get .generated_docs from the glob.
shopt
-s
dotglob
shopt
-s
dotglob
cp
-af
"
${
KUBE_TEMP
}
"
/
*
"
${
KUBE_ROOT
}
"
cp
-af
"
${
KUBE_TEMP
}
"
/
*
"
${
KUBE_ROOT
}
"
...
...
hack/local-up-discovery.sh
View file @
3b207306
...
@@ -91,7 +91,7 @@ function start_discovery {
...
@@ -91,7 +91,7 @@ function start_discovery {
${
kubectl
}
config set-cluster local-up-cluster
--kubeconfig
=
"
${
CERT_DIR
}
/admin-discovery.kubeconfig"
--certificate-authority
=
"
${
CERT_DIR
}
/discovery-ca.crt"
--embed-certs
--server
=
"https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
"
${
kubectl
}
config set-cluster local-up-cluster
--kubeconfig
=
"
${
CERT_DIR
}
/admin-discovery.kubeconfig"
--certificate-authority
=
"
${
CERT_DIR
}
/discovery-ca.crt"
--embed-certs
--server
=
"https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
"
# Wait for kubernetes-discovery to come up before launching the rest of the components.
# Wait for kubernetes-discovery to come up before launching the rest of the components.
#
this should work since we're creating a node port service
#
This should work since we're creating a node port service.
echo
"Waiting for kubernetes-discovery to come up: https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
/version"
echo
"Waiting for kubernetes-discovery to come up: https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
/version"
kube::util::wait_for_url
"https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
/version"
"kubernetes-discovery: "
1 60
||
exit
1
kube::util::wait_for_url
"https://
${
API_HOST_IP
}
:
${
DISCOVERY_SECURE_PORT
}
/version"
"kubernetes-discovery: "
1 60
||
exit
1
...
...
hack/update-generated-protobuf-dockerized.sh
View file @
3b207306
...
@@ -49,4 +49,4 @@ PATH="${KUBE_ROOT}/_output/bin:${PATH}" \
...
@@ -49,4 +49,4 @@ PATH="${KUBE_ROOT}/_output/bin:${PATH}" \
"
${
gotoprotobuf
}
"
\
"
${
gotoprotobuf
}
"
\
--proto-import
=
"
${
KUBE_ROOT
}
/vendor"
\
--proto-import
=
"
${
KUBE_ROOT
}
/vendor"
\
--proto-import
=
"
${
KUBE_ROOT
}
/third_party/protobuf"
\
--proto-import
=
"
${
KUBE_ROOT
}
/third_party/protobuf"
\
$@
"
$@
"
hack/verify-symbols.sh
View file @
3b207306
...
@@ -25,7 +25,7 @@ kube::golang::setup_env
...
@@ -25,7 +25,7 @@ kube::golang::setup_env
make
-C
"
${
KUBE_ROOT
}
"
WHAT
=
cmd/hyperkube
make
-C
"
${
KUBE_ROOT
}
"
WHAT
=
cmd/hyperkube
#
a
dd other BADSYMBOLS here.
#
A
dd other BADSYMBOLS here.
BADSYMBOLS
=(
BADSYMBOLS
=(
"httptest"
"httptest"
"testify"
"testify"
...
...
test/integration/garbagecollector/garbage_collector_test.go
View file @
3b207306
...
@@ -428,7 +428,7 @@ func TestOrphaning(t *testing.T) {
...
@@ -428,7 +428,7 @@ func TestOrphaning(t *testing.T) {
t
.
Fatalf
(
"Failed to create replication controller: %v"
,
err
)
t
.
Fatalf
(
"Failed to create replication controller: %v"
,
err
)
}
}
// these pods should be ophaned.
// these pods should be o
r
phaned.
var
podUIDs
[]
types
.
UID
var
podUIDs
[]
types
.
UID
podsNum
:=
3
podsNum
:=
3
for
i
:=
0
;
i
<
podsNum
;
i
++
{
for
i
:=
0
;
i
<
podsNum
;
i
++
{
...
@@ -478,7 +478,7 @@ func TestOrphaning(t *testing.T) {
...
@@ -478,7 +478,7 @@ func TestOrphaning(t *testing.T) {
}
}
for
_
,
pod
:=
range
pods
.
Items
{
for
_
,
pod
:=
range
pods
.
Items
{
if
len
(
pod
.
ObjectMeta
.
OwnerReferences
)
!=
0
{
if
len
(
pod
.
ObjectMeta
.
OwnerReferences
)
!=
0
{
t
.
Errorf
(
"pod %s still has non-empty OwnerRefereces: %v"
,
pod
.
ObjectMeta
.
Name
,
pod
.
ObjectMeta
.
OwnerReferences
)
t
.
Errorf
(
"pod %s still has non-empty OwnerRefere
n
ces: %v"
,
pod
.
ObjectMeta
.
Name
,
pod
.
ObjectMeta
.
OwnerReferences
)
}
}
}
}
}
}
test/integration/scheduler/scheduler_test.go
View file @
3b207306
...
@@ -174,7 +174,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names
...
@@ -174,7 +174,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names
err
=
waitForReflection
(
t
,
s
,
nodeKey
,
func
(
node
interface
{})
bool
{
err
=
waitForReflection
(
t
,
s
,
nodeKey
,
func
(
node
interface
{})
bool
{
// An unschedulable node should still be present in the store
// An unschedulable node should still be present in the store
// Nodes that are unschedulable or that are not ready or
// Nodes that are unschedulable or that are not ready or
// have their disk full (Node.Spec.Conditions) are exluded
// have their disk full (Node.Spec.Conditions) are ex
c
luded
// based on NodeConditionPredicate, a separate check
// based on NodeConditionPredicate, a separate check
return
node
!=
nil
&&
node
.
(
*
v1
.
Node
)
.
Spec
.
Unschedulable
==
true
return
node
!=
nil
&&
node
.
(
*
v1
.
Node
)
.
Spec
.
Unschedulable
==
true
})
})
...
@@ -319,7 +319,7 @@ func TestMultiScheduler(t *testing.T) {
...
@@ -319,7 +319,7 @@ func TestMultiScheduler(t *testing.T) {
8. create 2 pods: testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2
8. create 2 pods: testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2
- note: these two pods belong to default scheduler which no longer exists
- note: these two pods belong to default scheduler which no longer exists
9. **check point-3**:
9. **check point-3**:
- testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2 shoul
e
NOT be scheduled
- testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2 shoul
d
NOT be scheduled
*/
*/
// 1. create and start default-scheduler
// 1. create and start default-scheduler
clientSet
:=
clientset
.
NewForConfigOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
&
registered
.
GroupOrDie
(
v1
.
GroupName
)
.
GroupVersion
}})
clientSet
:=
clientset
.
NewForConfigOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
&
registered
.
GroupOrDie
(
v1
.
GroupName
)
.
GroupVersion
}})
...
@@ -453,7 +453,7 @@ func TestMultiScheduler(t *testing.T) {
...
@@ -453,7 +453,7 @@ func TestMultiScheduler(t *testing.T) {
}
}
// 9. **check point-3**:
// 9. **check point-3**:
// - testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2 shoul
e
NOT be scheduled
// - testPodNoAnnotation2 and testPodWithAnnotationFitsDefault2 shoul
d
NOT be scheduled
err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodNoAnnotation2.Namespace, testPodNoAnnotation2.Name))
err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodNoAnnotation2.Namespace, testPodNoAnnotation2.Name))
if err == nil {
if err == nil {
t.Errorf("Test MultiScheduler: %s Pod got scheduled, %v", testPodNoAnnotation2.Name, err)
t.Errorf("Test MultiScheduler: %s Pod got scheduled, %v", testPodNoAnnotation2.Name, err)
...
@@ -587,7 +587,7 @@ func TestAllocatable(t *testing.T) {
...
@@ -587,7 +587,7 @@ func TestAllocatable(t *testing.T) {
// 7. Test: this test pod should not be scheduled since it request more than Allocatable
// 7. Test: this test pod should not be scheduled since it request more than Allocatable
err
=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
5
,
podScheduled
(
clientSet
,
testAllocPod2
.
Namespace
,
testAllocPod2
.
Name
))
err
=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
5
,
podScheduled
(
clientSet
,
testAllocPod2
.
Namespace
,
testAllocPod2
.
Name
))
if
err
==
nil
{
if
err
==
nil
{
t
.
Errorf
(
"Test allocatable awareness: %s Pod got scheduled unexpectly, %v"
,
testAllocPod2
.
Name
,
err
)
t
.
Errorf
(
"Test allocatable awareness: %s Pod got scheduled unexpect
ed
ly, %v"
,
testAllocPod2
.
Name
,
err
)
}
else
{
}
else
{
t
.
Logf
(
"Test allocatable awareness: %s Pod not scheduled as expected"
,
testAllocPod2
.
Name
)
t
.
Logf
(
"Test allocatable awareness: %s Pod not scheduled as expected"
,
testAllocPod2
.
Name
)
}
}
...
...
test/integration/scheduler_perf/scheduler_test.go
View file @
3b207306
...
@@ -184,7 +184,7 @@ func defaultSchedulerBenchmarkConfig(numNodes, numPods int) *testConfig {
...
@@ -184,7 +184,7 @@ func defaultSchedulerBenchmarkConfig(numNodes, numPods int) *testConfig {
// This is used to learn the scheduling throughput on various
// This is used to learn the scheduling throughput on various
// sizes of cluster and changes as more and more pods are scheduled.
// sizes of cluster and changes as more and more pods are scheduled.
// It won't stop until all pods are scheduled.
// It won't stop until all pods are scheduled.
// It ret
ru
ns the minimum of throughput over whole run.
// It ret
ur
ns the minimum of throughput over whole run.
func
schedulePods
(
config
*
testConfig
)
int32
{
func
schedulePods
(
config
*
testConfig
)
int32
{
defer
config
.
destroyFunc
()
defer
config
.
destroyFunc
()
if
err
:=
config
.
nodePreparer
.
PrepareNodes
();
err
!=
nil
{
if
err
:=
config
.
nodePreparer
.
PrepareNodes
();
err
!=
nil
{
...
...
test/integration/thirdparty/thirdparty_test.go
View file @
3b207306
...
@@ -78,7 +78,7 @@ type FooList struct {
...
@@ -78,7 +78,7 @@ type FooList struct {
Items
[]
Foo
`json:"items"`
Items
[]
Foo
`json:"items"`
}
}
// installThirdParty installs a third party resoure and returns a defer func
// installThirdParty installs a third party resour
c
e and returns a defer func
func
installThirdParty
(
t
*
testing
.
T
,
client
clientset
.
Interface
,
clientConfig
*
restclient
.
Config
,
tpr
*
extensions
.
ThirdPartyResource
,
group
,
version
,
resource
string
)
func
()
{
func
installThirdParty
(
t
*
testing
.
T
,
client
clientset
.
Interface
,
clientConfig
*
restclient
.
Config
,
tpr
*
extensions
.
ThirdPartyResource
,
group
,
version
,
resource
string
)
func
()
{
var
err
error
var
err
error
_
,
err
=
client
.
Extensions
()
.
ThirdPartyResources
()
.
Create
(
tpr
)
_
,
err
=
client
.
Extensions
()
.
ThirdPartyResources
()
.
Create
(
tpr
)
...
...
test/integration/volume/persistent_volumes_test.go
View file @
3b207306
...
@@ -372,7 +372,7 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) {
...
@@ -372,7 +372,7 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) {
_
,
s
:=
framework
.
RunAMaster
(
nil
)
_
,
s
:=
framework
.
RunAMaster
(
nil
)
defer
s
.
Close
()
defer
s
.
Close
()
ns
:=
framework
.
CreateTestingNamespace
(
"pvc-match-express
s
ions"
,
s
,
t
)
ns
:=
framework
.
CreateTestingNamespace
(
"pvc-match-expressions"
,
s
,
t
)
defer
framework
.
DeleteTestingNamespace
(
ns
,
s
,
t
)
defer
framework
.
DeleteTestingNamespace
(
ns
,
s
,
t
)
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
ns
,
t
,
s
,
defaultSyncPeriod
)
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
ns
,
t
,
s
,
defaultSyncPeriod
)
...
@@ -778,7 +778,7 @@ func TestPersistentVolumeControllerStartup(t *testing.T) {
...
@@ -778,7 +778,7 @@ func TestPersistentVolumeControllerStartup(t *testing.T) {
}
}
pvs
[
i
]
=
newPV
pvs
[
i
]
=
newPV
// Drain watchPV with all events generated by the PV until it's bound
// Drain watchPV with all events generated by the PV until it's bound
// We don't want to catch "PV cr
a
ated with Status.Phase == Pending"
// We don't want to catch "PV cr
e
ated with Status.Phase == Pending"
// later in this test.
// later in this test.
waitForAnyPersistentVolumePhase
(
watchPV
,
v1
.
VolumeBound
)
waitForAnyPersistentVolumePhase
(
watchPV
,
v1
.
VolumeBound
)
}
}
...
@@ -1135,7 +1135,7 @@ func createClients(ns *v1.Namespace, t *testing.T, s *httptest.Server, syncPerio
...
@@ -1135,7 +1135,7 @@ func createClients(ns *v1.Namespace, t *testing.T, s *httptest.Server, syncPerio
}
}
watchPVC
,
err
:=
testClient
.
PersistentVolumeClaims
(
ns
.
Name
)
.
Watch
(
v1
.
ListOptions
{})
watchPVC
,
err
:=
testClient
.
PersistentVolumeClaims
(
ns
.
Name
)
.
Watch
(
v1
.
ListOptions
{})
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Failed to watch PersistentVolumeClaims
s
: %v"
,
err
)
t
.
Fatalf
(
"Failed to watch PersistentVolumeClaims: %v"
,
err
)
}
}
return
testClient
,
ctrl
,
watchPV
,
watchPVC
return
testClient
,
ctrl
,
watchPV
,
watchPVC
...
...
test/kubemark/run-e2e-tests.sh
View file @
3b207306
...
@@ -40,5 +40,5 @@ else
...
@@ -40,5 +40,5 @@ else
fi
fi
go run ./hack/e2e.go
-v
--check_version_skew
=
false
--test
--test_args
=
"--e2e-verify-service-account=false --dump-logs-on-failure=false
${
ARGS
}
"
go run ./hack/e2e.go
-v
--check_version_skew
=
false
--test
--test_args
=
"--e2e-verify-service-account=false --dump-logs-on-failure=false
${
ARGS
}
"
# Just make local test
ing
easier...
# Just make local test easier...
# ${KUBE_ROOT}/hack/ginkgo-e2e.sh "--e2e-verify-service-account=false" "--dump-logs-on-failure=false" $ARGS
# ${KUBE_ROOT}/hack/ginkgo-e2e.sh "--e2e-verify-service-account=false" "--dump-logs-on-failure=false" $ARGS
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