Skip to content

Commit

Permalink
test: quota and refquota params
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinandan Purkait <[email protected]>
  • Loading branch information
Abhinandan-Purkait committed Jan 9, 2025
1 parent 102ed7d commit 0479268
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,19 @@ func VerifyStorageClassParams(property map[string]string) {
// Refer https://github.com/openebs/zfs-localpv/issues/560#issuecomment-2232535073
func generateThinProvisionParams(property map[string]string) {
if property["fstype"] == "zfs" {
property["quota"] = capacity
property["reservation"] = defaultReservation
if property["thinprovision"] == "no" {
property["reservation"] = capacity
if property["quotatype"] == "quota" {
property["quota"] = string(capacity)
if property["thinprovision"] == "no" {
property["reservation"] = string(capacity)
}
}
if property["quotatype"] == "refquota" {
property["refquota"] = string(capacity)
if property["thinprovision"] == "no" {
property["refreservation"] = string(capacity)
}
}
delete(property, "quotatype")
} else {
property["quota"] = "-"
property["reservation"] = defaultReservation
Expand Down Expand Up @@ -701,5 +709,18 @@ func getStoragClassParams() []map[string]string {
"fstype": "xfs",
"compression": "zstd-fast",
},
{
"fstype": "zfs",
"quotatype": "quota",
},
{
"fstype": "zfs",
"quotatype": "refquota",
},
{
"fstype": "zfs",
"thinprovision": "no",
"quotatype": "refquota",
},
}
}

0 comments on commit 0479268

Please sign in to comment.