1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-18 20:58:10 +00:00
kube-bench/cmd
Simarpreet Singh d12a45bba9 Properly initialize viper library when checking for master components (#434)
* common_test: Add a failing test to show the SISEGV

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: Go green by fixing isMaster() to instantiate viper

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: Inject a seam for getBinariesFunc to be patched-in.

Also adds additional tests to showcase unhappy behaviors.

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common_test: Rename TestIsMaster()

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: init viper with master config

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: Add a pre-check if valid yaml is passed but doesn't include master.

Also adds additional tests to showcase unhappy behaviors.

Signed-off-by: Simarpreet Singh <simar@linux.com>

* mod: Upgrade viper to v1.4.0

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: Refactor node only yaml to a file

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common: Log  when master components are not found

Signed-off-by: Simarpreet Singh <simar@linux.com>

* common_test: Refactor subtests into a table

Signed-off-by: Simarpreet Singh <simar@linux.com>
2019-10-14 11:15:08 -04:00
..
common_test.go Properly initialize viper library when checking for master components (#434) 2019-10-14 11:15:08 -04:00
common.go Properly initialize viper library when checking for master components (#434) 2019-10-14 11:15:08 -04:00
database.go Lint all code for golint tests 2018-01-11 10:01:58 -08:00
master.go Add function to retrieve Kubernetes server version. 2017-09-17 19:49:13 +00:00
node.go Add function to retrieve Kubernetes server version. 2017-09-17 19:49:13 +00:00
root.go Fixes issue #289: removed versions prior to 1.11 (#429) 2019-10-14 10:52:43 -04:00
util_test.go Fixes issue #289: removed versions prior to 1.11 (#429) 2019-10-14 10:52:43 -04:00
util.go Properly initialize viper library when checking for master components (#434) 2019-10-14 11:15:08 -04:00
version.go kube-bench: add version subcommand 2019-06-12 01:41:09 -07:00