File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ class KubeletCheck(
165
165
166
166
def __init__ (self , name , init_config , instances ):
167
167
if os .getenv ("DD_KUBERNETES_KUBELET_CORE_CHECK_ENABLED" ) == "true" :
168
- raise SkipInstanceError ("The kubelet core check is enabled, skipping initialization of the python kubelet check" )
168
+ raise SkipInstanceError (
169
+ "The kubelet core check is enabled, skipping initialization of the python kubelet check"
170
+ )
169
171
self .KUBELET_METRIC_TRANSFORMERS = {
170
172
'kubelet_container_log_filesystem_used_bytes' : self .kubelet_container_log_filesystem_used_bytes ,
171
173
'rest_client_request_latency_seconds' : self .rest_client_latency ,
Original file line number Diff line number Diff line change 16
16
from datadog_checks .base .checks .kubelet_base .base import KubeletCredentials
17
17
from datadog_checks .base .errors import SkipInstanceError
18
18
from datadog_checks .base .utils .date import parse_rfc3339
19
- from datadog_checks .base .errors import SkipInstanceError
20
19
from datadog_checks .dev .http import MockResponse
21
20
from datadog_checks .kubelet import KubeletCheck , PodListUtils
22
21
@@ -1564,8 +1563,9 @@ def test_kubelet_unavailable_check_can_init(monkeypatch):
1564
1563
check = mock_kubelet_check (monkeypatch , [instance ], kube_version = None )
1565
1564
assert check is not None
1566
1565
1566
+
1567
1567
def test_kubelet_does_not_init_if_config_var_set_to_true (monkeypatch ):
1568
1568
monkeypatch .setenv ("DD_KUBERNETES_KUBELET_CORE_CHECK_ENABLED" , "true" )
1569
1569
with pytest .raises (SkipInstanceError ):
1570
1570
KubeletCheck ('kubelet' , {}, [{}])
1571
- return
1571
+ return
You can’t perform that action at this time.
0 commit comments