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
348a0239
Commit
348a0239
authored
Feb 17, 2018
by
Serguei Bezverkhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing CSI E2E test
parent
220bdf26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
csi_client_test.go
pkg/volume/csi/csi_client_test.go
+1
-0
csi_plugin.go
pkg/volume/csi/csi_plugin.go
+1
-1
fake_client.go
pkg/volume/csi/fake/fake_client.go
+1
-0
csi_volumes.go
test/e2e/storage/csi_volumes.go
+11
-10
No files found.
pkg/volume/csi/csi_client_test.go
View file @
348a0239
...
@@ -49,6 +49,7 @@ func TestClientAssertSupportedVersion(t *testing.T) {
...
@@ -49,6 +49,7 @@ func TestClientAssertSupportedVersion(t *testing.T) {
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
0
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
0
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
1
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
1
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
1
,
Patch
:
10
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
1
,
Patch
:
10
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
0
,
Minor
:
2
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
1
,
Minor
:
1
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
1
,
Minor
:
1
,
Patch
:
0
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
1
,
Minor
:
0
,
Patch
:
10
}},
{
testName
:
"supported version"
,
ver
:
&
csipb
.
Version
{
Major
:
1
,
Minor
:
0
,
Patch
:
10
}},
{
testName
:
"unsupported version"
,
ver
:
&
csipb
.
Version
{
Major
:
10
,
Minor
:
0
,
Patch
:
0
},
mustFail
:
true
},
{
testName
:
"unsupported version"
,
ver
:
&
csipb
.
Version
{
Major
:
10
,
Minor
:
0
,
Patch
:
0
},
mustFail
:
true
},
...
...
pkg/volume/csi/csi_plugin.go
View file @
348a0239
...
@@ -46,7 +46,7 @@ const (
...
@@ -46,7 +46,7 @@ const (
var
(
var
(
// csiVersion supported csi version
// csiVersion supported csi version
csiVersion
=
&
csipb
.
Version
{
Major
:
0
,
Minor
:
1
,
Patch
:
0
}
csiVersion
=
&
csipb
.
Version
{
Major
:
0
,
Minor
:
2
,
Patch
:
0
}
)
)
type
csiPlugin
struct
{
type
csiPlugin
struct
{
...
...
pkg/volume/csi/fake/fake_client.go
View file @
348a0239
...
@@ -53,6 +53,7 @@ func (f *IdentityClient) GetSupportedVersions(ctx grpctx.Context, req *csipb.Get
...
@@ -53,6 +53,7 @@ func (f *IdentityClient) GetSupportedVersions(ctx grpctx.Context, req *csipb.Get
SupportedVersions
:
[]
*
csipb
.
Version
{
SupportedVersions
:
[]
*
csipb
.
Version
{
{
Major
:
0
,
Minor
:
0
,
Patch
:
1
},
{
Major
:
0
,
Minor
:
0
,
Patch
:
1
},
{
Major
:
0
,
Minor
:
1
,
Patch
:
0
},
{
Major
:
0
,
Minor
:
1
,
Patch
:
0
},
{
Major
:
0
,
Minor
:
2
,
Patch
:
0
},
{
Major
:
1
,
Minor
:
0
,
Patch
:
0
},
{
Major
:
1
,
Minor
:
0
,
Patch
:
0
},
{
Major
:
1
,
Minor
:
0
,
Patch
:
1
},
{
Major
:
1
,
Minor
:
0
,
Patch
:
1
},
{
Major
:
1
,
Minor
:
1
,
Patch
:
1
},
{
Major
:
1
,
Minor
:
1
,
Patch
:
1
},
...
...
test/e2e/storage/csi_volumes.go
View file @
348a0239
...
@@ -39,7 +39,7 @@ const (
...
@@ -39,7 +39,7 @@ const (
csiDriverRegistrarImage
string
=
"quay.io/k8scsi/driver-registrar:v0.2.0"
csiDriverRegistrarImage
string
=
"quay.io/k8scsi/driver-registrar:v0.2.0"
)
)
func
externalAttacher
ServiceAccount
(
func
csi
ServiceAccount
(
client
clientset
.
Interface
,
client
clientset
.
Interface
,
config
framework
.
VolumeTestConfig
,
config
framework
.
VolumeTestConfig
,
teardown
bool
,
teardown
bool
,
...
@@ -71,7 +71,7 @@ func externalAttacherServiceAccount(
...
@@ -71,7 +71,7 @@ func externalAttacherServiceAccount(
return
ret
return
ret
}
}
func
externalAttacher
ClusterRole
(
func
csi
ClusterRole
(
client
clientset
.
Interface
,
client
clientset
.
Interface
,
config
framework
.
VolumeTestConfig
,
config
framework
.
VolumeTestConfig
,
teardown
bool
,
teardown
bool
,
...
@@ -89,7 +89,7 @@ func externalAttacherClusterRole(
...
@@ -89,7 +89,7 @@ func externalAttacherClusterRole(
},
},
{
{
APIGroups
:
[]
string
{
""
},
APIGroups
:
[]
string
{
""
},
Resources
:
[]
string
{
"persistentvolume
s
claims"
},
Resources
:
[]
string
{
"persistentvolumeclaims"
},
Verbs
:
[]
string
{
"get"
,
"list"
,
"watch"
,
"update"
},
Verbs
:
[]
string
{
"get"
,
"list"
,
"watch"
,
"update"
},
},
},
{
{
...
@@ -129,7 +129,7 @@ func externalAttacherClusterRole(
...
@@ -129,7 +129,7 @@ func externalAttacherClusterRole(
return
ret
return
ret
}
}
func
externalAttacher
ClusterRoleBinding
(
func
csi
ClusterRoleBinding
(
client
clientset
.
Interface
,
client
clientset
.
Interface
,
config
framework
.
VolumeTestConfig
,
config
framework
.
VolumeTestConfig
,
teardown
bool
,
teardown
bool
,
...
@@ -211,18 +211,18 @@ var _ = utils.SIGDescribe("CSI Volumes [Feature:CSI]", func() {
...
@@ -211,18 +211,18 @@ var _ = utils.SIGDescribe("CSI Volumes [Feature:CSI]", func() {
BeforeEach
(
func
()
{
BeforeEach
(
func
()
{
By
(
"deploying csi hostpath driver"
)
By
(
"deploying csi hostpath driver"
)
clusterRole
=
externalAttacher
ClusterRole
(
cs
,
config
,
false
)
clusterRole
=
csi
ClusterRole
(
cs
,
config
,
false
)
serviceAccount
=
externalAttacher
ServiceAccount
(
cs
,
config
,
false
)
serviceAccount
=
csi
ServiceAccount
(
cs
,
config
,
false
)
externalAttacher
ClusterRoleBinding
(
cs
,
config
,
false
,
serviceAccount
,
clusterRole
)
csi
ClusterRoleBinding
(
cs
,
config
,
false
,
serviceAccount
,
clusterRole
)
csiHostPathPod
(
cs
,
config
,
false
,
f
,
serviceAccount
)
csiHostPathPod
(
cs
,
config
,
false
,
f
,
serviceAccount
)
})
})
AfterEach
(
func
()
{
AfterEach
(
func
()
{
By
(
"uninstalling csi hostpath driver"
)
By
(
"uninstalling csi hostpath driver"
)
csiHostPathPod
(
cs
,
config
,
true
,
f
,
serviceAccount
)
csiHostPathPod
(
cs
,
config
,
true
,
f
,
serviceAccount
)
externalAttacher
ClusterRoleBinding
(
cs
,
config
,
true
,
serviceAccount
,
clusterRole
)
csi
ClusterRoleBinding
(
cs
,
config
,
true
,
serviceAccount
,
clusterRole
)
serviceAccount
=
externalAttacher
ServiceAccount
(
cs
,
config
,
true
)
serviceAccount
=
csi
ServiceAccount
(
cs
,
config
,
true
)
clusterRole
=
externalAttacher
ClusterRole
(
cs
,
config
,
true
)
clusterRole
=
csi
ClusterRole
(
cs
,
config
,
true
)
})
})
It
(
"should provision storage with a hostPath CSI driver"
,
func
()
{
It
(
"should provision storage with a hostPath CSI driver"
,
func
()
{
...
@@ -237,6 +237,7 @@ var _ = utils.SIGDescribe("CSI Volumes [Feature:CSI]", func() {
...
@@ -237,6 +237,7 @@ var _ = utils.SIGDescribe("CSI Volumes [Feature:CSI]", func() {
claim
:=
newClaim
(
t
,
ns
.
GetName
(),
""
)
claim
:=
newClaim
(
t
,
ns
.
GetName
(),
""
)
class
:=
newStorageClass
(
t
,
ns
.
GetName
(),
""
)
class
:=
newStorageClass
(
t
,
ns
.
GetName
(),
""
)
claim
.
Spec
.
StorageClassName
=
&
class
.
ObjectMeta
.
Name
testDynamicProvisioning
(
t
,
cs
,
claim
,
class
)
testDynamicProvisioning
(
t
,
cs
,
claim
,
class
)
})
})
})
})
...
...
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