Skip to content

Commit

Permalink
Sanity Test Fixes (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhatdell authored Jan 12, 2024
1 parent ed90a01 commit 263ff10
Show file tree
Hide file tree
Showing 11 changed files with 932 additions and 154 deletions.
13 changes: 8 additions & 5 deletions tests/sanity/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
#
# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,12 +14,15 @@
#
#

FROM golang:1.13.4 as build-env
FROM golang:1.21.6 as build-env

RUN go get -u github.com/kubernetes-csi/csi-test/...
RUN git clone https://github.com/kubernetes-csi/csi-test.git && \
cd csi-test/cmd/csi-sanity && \
make clean install && \
cp ./csi-sanity /csi-sanity

FROM frolvlad/alpine-glibc
WORKDIR /app/csi-sanity/
COPY --from=build-env /go/bin/csi-sanity .
COPY --from=build-env /csi-sanity .

ENTRYPOINT [ "./csi-sanity" ]
ENTRYPOINT [ "./csi-sanity" ]
25 changes: 0 additions & 25 deletions tests/sanity/helm/config.yaml

This file was deleted.

16 changes: 10 additions & 6 deletions tests/sanity/helm/sanity-csi-powerstore/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
#
# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,20 +13,24 @@
# limitations under the License.
#
#

apiVersion: v2
appVersion: "2.9.0"
name: sanity-csi-powerstore
version: 1.0.0
appVersion: 1.0.0
version: 2.9.0
description: |
PowerStore CSI (Container Storage Interface) driver Kubernetes
integration. This chart includes everything required to provision via CSI as
well as a PowerStore StorageClass.
type: application
kubeVersion: ">= 1.24.0 < 1.29.0"
# If you are using a complex K8s version like "v1.24.3-mirantis-1", use this kubeVersion check instead
# WARNING: this version of the check will allow the use of alpha and beta versions, which is NOT SUPPORTED
# kubeVersion: ">= 1.24.0-0 < 1.29.0-0"
keywords:
- csi
- storage
home: https://github.com/dell/csi-powerstore
sources:
- https://github.com/dell/csi-powerstore
maintainers:
- name: DellEMC
engine: gotpl
- name: DellEMC
10 changes: 10 additions & 0 deletions tests/sanity/helm/sanity-csi-powerstore/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{/*
Return true if storage capacity tracking is enabled and is supported based on k8s version
*/}}
{{- define "csi-powerstore.isStorageCapacitySupported" -}}
{{- if eq .Values.storageCapacity.enabled true -}}
{{- if and (eq .Capabilities.KubeVersion.Major "1") (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- true -}}
{{- end -}}
{{- end -}}
{{- end -}}
Loading

0 comments on commit 263ff10

Please sign in to comment.