mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
e2e: add -is-openshift option to disable certain checks
On OpenShift it is not possible for the Rook toolbox to get the metrics from Kubelet (without additional configuration). By passing -is-openshift, the metrics are not checked, and the e2e suite does not fail on that particular piece. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
92866f46fd
commit
5bc8584b02
@ -102,6 +102,7 @@ are available while running tests:
|
|||||||
| timeout | Panic test binary after duration d (default 0, timeout disabled) |
|
| timeout | Panic test binary after duration d (default 0, timeout disabled) |
|
||||||
| v | Verbose: print additional output |
|
| v | Verbose: print additional output |
|
||||||
| filesystem | Name of the CephFS filesystem (default: "myfs") |
|
| filesystem | Name of the CephFS filesystem (default: "myfs") |
|
||||||
|
| is-openshift | Run in OpenShift compatibility mode, skips certain new feature tests |
|
||||||
|
|
||||||
## E2E for snapshot
|
## E2E for snapshot
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ func init() {
|
|||||||
flag.StringVar(&cephCSINamespace, "cephcsi-namespace", defaultNs, "namespace in which cephcsi deployed")
|
flag.StringVar(&cephCSINamespace, "cephcsi-namespace", defaultNs, "namespace in which cephcsi deployed")
|
||||||
flag.StringVar(&rookNamespace, "rook-namespace", "rook-ceph", "namespace in which rook is deployed")
|
flag.StringVar(&rookNamespace, "rook-namespace", "rook-ceph", "namespace in which rook is deployed")
|
||||||
flag.StringVar(&fileSystemName, "filesystem", "myfs", "CephFS filesystem to use")
|
flag.StringVar(&fileSystemName, "filesystem", "myfs", "CephFS filesystem to use")
|
||||||
|
flag.BoolVar(&isOpenShift, "is-openshift", false, "disables certain checks on OpenShift")
|
||||||
setDefaultKubeconfig()
|
setDefaultKubeconfig()
|
||||||
|
|
||||||
// Register framework flags, then handle flags
|
// Register framework flags, then handle flags
|
||||||
|
@ -78,6 +78,7 @@ var (
|
|||||||
rookNamespace string
|
rookNamespace string
|
||||||
radosNamespace string
|
radosNamespace string
|
||||||
poll = 2 * time.Second
|
poll = 2 * time.Second
|
||||||
|
isOpenShift bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func getMons(ns string, c kubernetes.Interface) ([]string, error) {
|
func getMons(ns string, c kubernetes.Interface) ([]string, error) {
|
||||||
@ -404,7 +405,7 @@ func validateNormalUserPVCAccess(pvcPath string, f *framework.Framework) error {
|
|||||||
if pvc.Spec.VolumeMode != nil {
|
if pvc.Spec.VolumeMode != nil {
|
||||||
isBlockMode = (*pvc.Spec.VolumeMode == v1.PersistentVolumeBlock)
|
isBlockMode = (*pvc.Spec.VolumeMode == v1.PersistentVolumeBlock)
|
||||||
}
|
}
|
||||||
if !isBlockMode || k8sVersionGreaterEquals(f.ClientSet, 1, 22) {
|
if (!isBlockMode || k8sVersionGreaterEquals(f.ClientSet, 1, 22)) && !isOpenShift {
|
||||||
err = getMetricsForPVC(f, pvc, deployTimeout)
|
err = getMetricsForPVC(f, pvc, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user