@@ -1445,6 +1445,96 @@ tests:
14451445 injectAnnotations: "false"
14461446 certificateDuration: "8760h"
14471447 certificateRenewBefore: "30m"
1448+ - name : Should accept networkPolicyProvisioning set to Managed (default)
1449+ resourceName : cluster
1450+ initial : |
1451+ apiVersion: operator.openshift.io/v1alpha1
1452+ kind: ExternalSecretsConfig
1453+ spec:
1454+ appConfig:
1455+ proxy:
1456+ httpProxy: "http://proxy.example.com:3128"
1457+ networkPolicyProvisioning: Managed
1458+ expected : |
1459+ apiVersion: operator.openshift.io/v1alpha1
1460+ kind: ExternalSecretsConfig
1461+ spec:
1462+ appConfig:
1463+ logLevel: 1
1464+ proxy:
1465+ httpProxy: "http://proxy.example.com:3128"
1466+ networkPolicyProvisioning: Managed
1467+ - name : Should accept networkPolicyProvisioning set to Unmanaged
1468+ resourceName : cluster
1469+ initial : |
1470+ apiVersion: operator.openshift.io/v1alpha1
1471+ kind: ExternalSecretsConfig
1472+ spec:
1473+ appConfig:
1474+ proxy:
1475+ httpProxy: "http://proxy.example.com:3128"
1476+ networkPolicyProvisioning: Unmanaged
1477+ expected : |
1478+ apiVersion: operator.openshift.io/v1alpha1
1479+ kind: ExternalSecretsConfig
1480+ spec:
1481+ appConfig:
1482+ logLevel: 1
1483+ proxy:
1484+ httpProxy: "http://proxy.example.com:3128"
1485+ networkPolicyProvisioning: Unmanaged
1486+ - name : Should default networkPolicyProvisioning to Managed when proxy is set without the field
1487+ resourceName : cluster
1488+ initial : |
1489+ apiVersion: operator.openshift.io/v1alpha1
1490+ kind: ExternalSecretsConfig
1491+ spec:
1492+ appConfig:
1493+ proxy:
1494+ httpProxy: "http://proxy.example.com:3128"
1495+ expected : |
1496+ apiVersion: operator.openshift.io/v1alpha1
1497+ kind: ExternalSecretsConfig
1498+ spec:
1499+ appConfig:
1500+ logLevel: 1
1501+ proxy:
1502+ httpProxy: "http://proxy.example.com:3128"
1503+ networkPolicyProvisioning: Managed
1504+ - name : Should fail with invalid value for networkPolicyProvisioning
1505+ resourceName : cluster
1506+ initial : |
1507+ apiVersion: operator.openshift.io/v1alpha1
1508+ kind: ExternalSecretsConfig
1509+ spec:
1510+ appConfig:
1511+ proxy:
1512+ httpProxy: "http://proxy.example.com:3128"
1513+ networkPolicyProvisioning: Enabled
1514+ expectedError : " spec.appConfig.proxy.networkPolicyProvisioning: Unsupported value: \" Enabled\" : supported values: \" Managed\" , \" Unmanaged\" "
1515+ - name : Should accept proxy config with all fields including networkPolicyProvisioning
1516+ resourceName : cluster
1517+ initial : |
1518+ apiVersion: operator.openshift.io/v1alpha1
1519+ kind: ExternalSecretsConfig
1520+ spec:
1521+ appConfig:
1522+ proxy:
1523+ httpProxy: "http://proxy.example.com:3128"
1524+ httpsProxy: "https://proxy.example.com:3129"
1525+ noProxy: "localhost,127.0.0.1,.cluster.local"
1526+ networkPolicyProvisioning: Unmanaged
1527+ expected : |
1528+ apiVersion: operator.openshift.io/v1alpha1
1529+ kind: ExternalSecretsConfig
1530+ spec:
1531+ appConfig:
1532+ logLevel: 1
1533+ proxy:
1534+ httpProxy: "http://proxy.example.com:3128"
1535+ httpsProxy: "https://proxy.example.com:3129"
1536+ noProxy: "localhost,127.0.0.1,.cluster.local"
1537+ networkPolicyProvisioning: Unmanaged
14481538 onUpdate :
14491539 - name : Should be able to update labels in controller config
14501540 resourceName : cluster
@@ -1726,3 +1816,30 @@ tests:
17261816 - to:
17271817 - ipBlock:
17281818 cidr: 172.16.0.0/12
1819+ - name : Should be able to update networkPolicyProvisioning from Managed to Unmanaged
1820+ resourceName : cluster
1821+ initial : |
1822+ apiVersion: operator.openshift.io/v1alpha1
1823+ kind: ExternalSecretsConfig
1824+ spec:
1825+ appConfig:
1826+ proxy:
1827+ httpProxy: "http://proxy.example.com:3128"
1828+ networkPolicyProvisioning: Managed
1829+ updated : |
1830+ apiVersion: operator.openshift.io/v1alpha1
1831+ kind: ExternalSecretsConfig
1832+ spec:
1833+ appConfig:
1834+ proxy:
1835+ httpProxy: "http://proxy.example.com:3128"
1836+ networkPolicyProvisioning: Unmanaged
1837+ expected : |
1838+ apiVersion: operator.openshift.io/v1alpha1
1839+ kind: ExternalSecretsConfig
1840+ spec:
1841+ appConfig:
1842+ logLevel: 1
1843+ proxy:
1844+ httpProxy: "http://proxy.example.com:3128"
1845+ networkPolicyProvisioning: Unmanaged
0 commit comments