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
f1ecf470
Unverified
Commit
f1ecf470
authored
Jan 22, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73167 from cofyc/fix71570
Do not check events in local PV e2e tests
parents
0b62ad23
e3bca51a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
56 deletions
+2
-56
BUILD
test/e2e/storage/BUILD
+0
-1
persistent_volumes-local.go
test/e2e/storage/persistent_volumes-local.go
+2
-55
No files found.
test/e2e/storage/BUILD
View file @
f1ecf470
...
@@ -48,7 +48,6 @@ go_library(
...
@@ -48,7 +48,6 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
...
...
test/e2e/storage/persistent_volumes-local.go
View file @
f1ecf470
...
@@ -35,7 +35,6 @@ import (
...
@@ -35,7 +35,6 @@ import (
storagev1
"k8s.io/api/storage/v1"
storagev1
"k8s.io/api/storage/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/api/resource"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/schema"
utilerrors
"k8s.io/apimachinery/pkg/util/errors"
utilerrors
"k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/sets"
...
@@ -326,25 +325,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
...
@@ -326,25 +325,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
By
(
"Deleting second pod"
)
By
(
"Deleting second pod"
)
framework
.
DeletePodOrFail
(
config
.
client
,
config
.
ns
,
pod2
.
Name
)
framework
.
DeletePodOrFail
(
config
.
client
,
config
.
ns
,
pod2
.
Name
)
})
})
It
(
"should not set different fsGroups for two pods simultaneously"
,
func
()
{
fsGroup1
,
fsGroup2
:=
int64
(
1234
),
int64
(
4321
)
By
(
"Create first pod and check fsGroup is set"
)
pod1
:=
createPodWithFsGroupTest
(
config
,
testVol
,
fsGroup1
,
fsGroup1
)
By
(
"Create second pod and check fsGroup is still the old one"
)
pod2
:=
createPodWithFsGroupTest
(
config
,
testVol
,
fsGroup2
,
fsGroup1
)
ep
:=
&
eventPatterns
{
reason
:
"AlreadyMountedVolume"
,
pattern
:
make
([]
string
,
2
),
}
ep
.
pattern
=
append
(
ep
.
pattern
,
fmt
.
Sprintf
(
"The requested fsGroup is %d"
,
fsGroup2
))
ep
.
pattern
=
append
(
ep
.
pattern
,
"The volume may not be shareable."
)
checkPodEvents
(
config
,
pod2
.
Name
,
ep
)
By
(
"Deleting first pod"
)
framework
.
DeletePodOrFail
(
config
.
client
,
config
.
ns
,
pod1
.
Name
)
By
(
"Deleting second pod"
)
framework
.
DeletePodOrFail
(
config
.
client
,
config
.
ns
,
pod2
.
Name
)
})
})
})
})
})
...
@@ -354,11 +334,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
...
@@ -354,11 +334,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
// TODO:
// TODO:
// - check for these errors in unit tests instead
// - check for these errors in unit tests instead
It
(
"should fail due to non-existent path"
,
func
()
{
It
(
"should fail due to non-existent path"
,
func
()
{
ep
:=
&
eventPatterns
{
reason
:
"FailedMount"
,
pattern
:
make
([]
string
,
2
)}
ep
.
pattern
=
append
(
ep
.
pattern
,
"MountVolume.NewMounter initialization failed"
)
testVol
:=
&
localTestVolume
{
testVol
:=
&
localTestVolume
{
node
:
config
.
node0
,
node
:
config
.
node0
,
hostDir
:
"/non-existent/location/nowhere"
,
hostDir
:
"/non-existent/location/nowhere"
,
...
@@ -368,7 +343,8 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
...
@@ -368,7 +343,8 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
createLocalPVCsPVs
(
config
,
[]
*
localTestVolume
{
testVol
},
immediateMode
)
createLocalPVCsPVs
(
config
,
[]
*
localTestVolume
{
testVol
},
immediateMode
)
pod
,
err
:=
createLocalPod
(
config
,
testVol
,
nil
)
pod
,
err
:=
createLocalPod
(
config
,
testVol
,
nil
)
Expect
(
err
)
.
To
(
HaveOccurred
())
Expect
(
err
)
.
To
(
HaveOccurred
())
checkPodEvents
(
config
,
pod
.
Name
,
ep
)
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
config
.
client
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
To
(
HaveOccurred
())
cleanupLocalPVCsPVs
(
config
,
[]
*
localTestVolume
{
testVol
})
cleanupLocalPVCsPVs
(
config
,
[]
*
localTestVolume
{
testVol
})
})
})
...
@@ -377,12 +353,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
...
@@ -377,12 +353,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
framework
.
Skipf
(
"Runs only when number of nodes >= 2"
)
framework
.
Skipf
(
"Runs only when number of nodes >= 2"
)
}
}
ep
:=
&
eventPatterns
{
reason
:
"FailedMount"
,
pattern
:
make
([]
string
,
2
)}
ep
.
pattern
=
append
(
ep
.
pattern
,
"NodeSelectorTerm"
)
ep
.
pattern
=
append
(
ep
.
pattern
,
"MountVolume.NodeAffinity check failed"
)
testVols
:=
setupLocalVolumesPVCsPVs
(
config
,
DirectoryLocalVolumeType
,
config
.
node0
,
1
,
immediateMode
)
testVols
:=
setupLocalVolumesPVCsPVs
(
config
,
DirectoryLocalVolumeType
,
config
.
node0
,
1
,
immediateMode
)
testVol
:=
testVols
[
0
]
testVol
:=
testVols
[
0
]
...
@@ -392,7 +362,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
...
@@ -392,7 +362,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
config
.
client
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
err
=
framework
.
WaitTimeoutForPodRunningInNamespace
(
config
.
client
,
pod
.
Name
,
pod
.
Namespace
,
framework
.
PodStartShortTimeout
)
Expect
(
err
)
.
To
(
HaveOccurred
())
Expect
(
err
)
.
To
(
HaveOccurred
())
checkPodEvents
(
config
,
pod
.
Name
,
ep
)
cleanupLocalVolumes
(
config
,
[]
*
localTestVolume
{
testVol
})
cleanupLocalVolumes
(
config
,
[]
*
localTestVolume
{
testVol
})
})
})
...
@@ -754,28 +723,6 @@ func testPodWithNodeConflict(config *localTestConfig, testVolType localVolumeTyp
...
@@ -754,28 +723,6 @@ func testPodWithNodeConflict(config *localTestConfig, testVolType localVolumeTyp
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
type
eventPatterns
struct
{
reason
string
pattern
[]
string
}
func
checkPodEvents
(
config
*
localTestConfig
,
podName
string
,
ep
*
eventPatterns
)
{
var
events
*
v1
.
EventList
selector
:=
fields
.
Set
{
"involvedObject.kind"
:
"Pod"
,
"involvedObject.name"
:
podName
,
"involvedObject.namespace"
:
config
.
ns
,
"reason"
:
ep
.
reason
,
}
.
AsSelector
()
.
String
()
options
:=
metav1
.
ListOptions
{
FieldSelector
:
selector
}
events
,
err
:=
config
.
client
.
CoreV1
()
.
Events
(
config
.
ns
)
.
List
(
options
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
len
(
events
.
Items
))
.
NotTo
(
Equal
(
0
))
for
_
,
p
:=
range
ep
.
pattern
{
Expect
(
events
.
Items
[
0
]
.
Message
)
.
To
(
ContainSubstring
(
p
))
}
}
// The tests below are run against multiple mount point types
// The tests below are run against multiple mount point types
// Test two pods at the same time, write from pod1, and read from pod2
// Test two pods at the same time, write from pod1, and read from pod2
...
...
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