aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-09-13 10:44:38 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-09-13 10:46:49 +0200
commitd9442c034dbee3680f35f5406e214ce393abec11 (patch)
treea318d16e9616bb96a98b2b028a56bd9bf807c891
parentb3bd560fd8a1bd155d4ef21bcfbe5f28e78b7147 (diff)
self.details must be a dict
Change-Id: I4f65a9eeb7eda471371668db9abfa49e2875c5b0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit b866c73d70079fdb52e5fc999f49a32d2af82349)
-rw-r--r--functest_kubernetes/security/security.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/functest_kubernetes/security/security.py b/functest_kubernetes/security/security.py
index 73c33b73..e6413764 100644
--- a/functest_kubernetes/security/security.py
+++ b/functest_kubernetes/security/security.py
@@ -198,12 +198,12 @@ class KubeBench(SecurityTesting):
def run(self, **kwargs):
super(KubeBench, self).run(**kwargs)
- self.details = ast.literal_eval(self.pod_log)
+ self.details["report"] = ast.literal_eval(self.pod_log)
msg = prettytable.PrettyTable(
header_style='upper', padding_width=5,
field_names=['node_type', 'version', 'test_desc', 'pass',
'fail', 'warn'])
- for details in self.details:
+ for details in self.details["report"]:
for test in details['tests']:
msg.add_row(
[details['node_type'], details['version'], test['desc'],