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
cecc3390
Commit
cecc3390
authored
Apr 18, 2018
by
Humble Chirammal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add volumenameprefix tests for glusterfs dynamic provisioner.
Signed-off-by:
Humble Chirammal
<
hchiramm@redhat.com
>
parent
fdbc9ef9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
glusterfs_test.go
pkg/volume/glusterfs/glusterfs_test.go
+45
-0
No files found.
pkg/volume/glusterfs/glusterfs_test.go
View file @
cecc3390
...
...
@@ -534,6 +534,29 @@ func TestParseClassParameters(t *testing.T) {
thinPoolSnapFactor
:
float32
(
50
),
},
},
{
"valid volumenameprefix: dept-dev"
,
map
[
string
]
string
{
"resturl"
:
"https://localhost:8080"
,
"restauthenabled"
:
"false"
,
"gidMin"
:
"4000"
,
"gidMax"
:
"5000"
,
"volumetype"
:
"disperse:4:2"
,
"snapfactor"
:
"50"
,
"volumenameprefix"
:
"dept-dev"
,
},
&
secret
,
false
,
// expect error
&
provisionerConfig
{
url
:
"https://localhost:8080"
,
gidMin
:
4000
,
gidMax
:
5000
,
volumeType
:
gapi
.
VolumeDurabilityInfo
{
Type
:
"disperse"
,
Replicate
:
gapi
.
ReplicaDurability
{
Replica
:
0
},
Disperse
:
gapi
.
DisperseDurability
{
Data
:
4
,
Redundancy
:
2
}},
thinPoolSnapFactor
:
float32
(
50
),
volumeNamePrefix
:
"dept-dev"
,
},
},
{
"invalid volumetype (disperse) parameter"
,
map
[
string
]
string
{
...
...
@@ -590,6 +613,28 @@ func TestParseClassParameters(t *testing.T) {
nil
,
},
{
"invalid volumenameprefix: string starting with '_'"
,
map
[
string
]
string
{
"resturl"
:
"https://localhost:8080"
,
"restauthenabled"
:
"false"
,
"volumenameprefix"
:
"_"
,
},
&
secret
,
true
,
// expect error
nil
,
},
{
"invalid volumenameprefix: string with '_'"
,
map
[
string
]
string
{
"resturl"
:
"https://localhost:8080"
,
"restauthenabled"
:
"false"
,
"volumenameprefix"
:
"qe_dept"
,
},
&
secret
,
true
,
// expect error
nil
,
},
{
"invalid thinPoolSnapFactor: value out of range"
,
map
[
string
]
string
{
"resturl"
:
"https://localhost:8080"
,
...
...
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