Check that kuryr-cni runs as a daemon
Depends-On: I52f164368072620567c26ee26d7f2fbd029f6a93 Change-Id: I0a587897843fd7c670570db70eafbead6037e11f
This commit is contained in:
parent
cccf230d10
commit
32944d50e9
|
@ -50,4 +50,6 @@ kuryr_k8s_opts = [
|
||||||
cfg.BoolOpt("npwg_multi_vif_enabled", default=False,
|
cfg.BoolOpt("npwg_multi_vif_enabled", default=False,
|
||||||
help="Whether or not NPWG multi-vif feature is enabled"),
|
help="Whether or not NPWG multi-vif feature is enabled"),
|
||||||
cfg.StrOpt("ocp_router_fip", default=None, help="OCP Router floating IP"),
|
cfg.StrOpt("ocp_router_fip", default=None, help="OCP Router floating IP"),
|
||||||
|
cfg.BoolOpt("kuryr_daemon_enabled", default=True, help="Whether or not "
|
||||||
|
"CNI should run as a daemon"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Copyright 2018 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
from tempest import config
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
|
from kuryr_tempest_plugin.tests.scenario import base
|
||||||
|
|
||||||
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
|
class TestKuryrDaemon(base.BaseKuryrScenarioTest):
|
||||||
|
@classmethod
|
||||||
|
def skip_checks(cls):
|
||||||
|
super(TestKuryrDaemon, cls).skip_checks()
|
||||||
|
if (not CONF.kuryr_kubernetes.containerized) or (
|
||||||
|
not CONF.kuryr_kubernetes.kuryr_daemon_enabled):
|
||||||
|
raise cls.skipException("Kuryr cni should be containerized "
|
||||||
|
"and Kuryr Daemon should be enabled "
|
||||||
|
"to run this test.")
|
||||||
|
|
||||||
|
@decorators.idempotent_id('bddf5441-1244-a49d-a125-b5fd3fb111a7')
|
||||||
|
def test_kuryr_cni_daemon(self):
|
||||||
|
namespace = CONF.kuryr_kubernetes.kube_system_namespace
|
||||||
|
kube_system_pods = self.get_pod_name_list(
|
||||||
|
namespace=namespace)
|
||||||
|
cmd = ["ps", "aux"]
|
||||||
|
|
||||||
|
for kuryr_pod_name in kube_system_pods:
|
||||||
|
if kuryr_pod_name.startswith('kuryr-cni'):
|
||||||
|
self.assertIn('kuryr-daemon', self.exec_command_in_pod(
|
||||||
|
kuryr_pod_name, cmd, namespace))
|
Loading…
Reference in New Issue