k8s: Resolve Docker response formatting issue 17/96417/1
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 30 Sep 2019 12:39:32 +0000 (14:39 +0200)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 30 Sep 2019 13:31:13 +0000 (15:31 +0200)
commit752f7fe7d6674624417a4f97a10e6acc7a3abe90
treeee66d28f2befc9d29c9d64acc69c45e8647a5ae8
parent155417479ebc5c531349dd898b96ef4a819b0f0a
k8s: Resolve Docker response formatting issue

Checker collects information on cluster by Docker queries:

$ docker ps ARGS...      # Casablanca
$ docker inspect ARGS... # Dublin

Arrays of values are then filtered from those. They include:

* opening bracket ('['),
* closing bracket (']'),
* new line.

Additional characters affect check results if last flag (including
"]\n") requires specific value.

Issue-ID: SECCOM-235
Change-Id: I6838342b7e2ecdc44a47ffe02286266003e0b4d3
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
test/security/k8s/src/check/rancher/rancher.go
test/security/k8s/src/check/raw/raw.go