Skip to content

Commit

Permalink
Addressing review comments
Browse files Browse the repository at this point in the history
Signed-off-by: pintojoy <[email protected]>
  • Loading branch information
pintojoy committed Nov 15, 2023
1 parent 0e4bd70 commit 1420799
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ocs_ci/ocs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@

SIMPLE_APP_POD_YAML = os.path.join(TEMPLATE_APP_POD_DIR, "simple-app.yaml")

NFS_APP_POD_YAML = os.path.join(TEMPLATE_APP_POD_DIR, "nfs_test_app.yaml")

FEDORA_DC_YAML = os.path.join(TEMPLATE_APP_POD_DIR, "fedora_dc.yaml")

PERF_DC_YAML = os.path.join(TEMPLATE_APP_POD_DIR, "performance_dc.yaml")
Expand Down
42 changes: 42 additions & 0 deletions ocs_ci/templates/app-pods/nfs_test_app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: nfs-test-pod
namespace: openshift-storage
labels:
app: nfs-test-pod
spec:
template:
metadata:
labels:
name: nfs-test-pod
spec:
restartPolicy: Always
volumes:
- name: vol
persistentVolumeClaim:
claimName: nfs-pvc
containers:
- name: fedora
image: fedora
command: ['/bin/bash', '-ce', 'tail -f /dev/null']
imagePullPolicy: IfNotPresent
securityContext:
capabilities: {}
privileged: true
volumeMounts:
- mountPath: /mnt
name: vol
livenessProbe:
exec:
command:
- 'sh'
- '-ec'
- 'df /mnt'
initialDelaySeconds: 3
periodSeconds: 3
replicas: 1
triggers:
- type: ConfigChange
paused: false
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pytest
import logging
import time
import yaml
import os


Expand All @@ -10,6 +9,7 @@
from ocs_ci.utility.connection import Connection
from ocs_ci.ocs import constants, ocp
from ocs_ci.helpers import helpers
from ocs_ci.utility import templating
from ocs_ci.framework.pytest_customization.marks import brown_squad
from ocs_ci.framework.testlib import (
skipif_ocs_version,
Expand Down Expand Up @@ -1143,6 +1143,7 @@ def test_respin_app_pod_exported_nfs_volume_incluster(

# Create deployment config for app pod
log.info("----create deployment config----")
'''
deployment_config = """
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
Expand Down Expand Up @@ -1186,7 +1187,8 @@ def test_respin_app_pod_exported_nfs_volume_incluster(
- type: ConfigChange
paused: false
"""
deployment_config_data = yaml.safe_load(deployment_config)
'''
deployment_config_data = templating.load_yaml(constants.FIO_DEPLOYMENT_YAML)
helpers.create_resource(**deployment_config_data)
time.sleep(60)

Expand Down

0 comments on commit 1420799

Please sign in to comment.