File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ config.CLUSTER_NAME = getClusterName();
4242config . IMAGE_STORAGE_ROOT = '/var/tmp' ;
4343config . POLICIES_STORAGE_ROOT = '/tmp/policies' ;
4444config . EXCLUDED_NAMESPACES = loadExcludedNamespaces ( ) ;
45+ config . WORKLOADS_TO_SCAN_QUEUE_WORKER_COUNT =
46+ Number ( config . WORKLOADS_TO_SCAN_QUEUE_WORKER_COUNT ) || 10 ;
4547
4648/**
4749 * Important: we delete the following env vars because we don't want to proxy requests to the Kubernetes API server.
Original file line number Diff line number Diff line change @@ -59,4 +59,18 @@ describe('extractNamespaceName()', () => {
5959 delete process . env . SNYK_CLUSTER_NAME ;
6060 } ,
6161 ) ;
62+
63+ it ( 'loads the expected configuration values' , ( ) => {
64+ const { config } = require ( '../../src/common/config' ) ;
65+ expect ( config . AGENT_ID ) . toEqual ( expect . any ( String ) ) ;
66+ expect ( config . INTEGRATION_ID ) . toEqual ( expect . any ( String ) ) ;
67+ expect ( config . CLUSTER_NAME ) . toEqual ( 'Default cluster' ) ;
68+ expect ( config . IMAGE_STORAGE_ROOT ) . toEqual ( '/var/tmp' ) ;
69+ expect ( config . EXCLUDED_NAMESPACES ) . toBeNull ( ) ;
70+ expect ( config . HTTPS_PROXY ) . toBeUndefined ( ) ;
71+ expect ( config . HTTP_PROXY ) . toBeUndefined ( ) ;
72+ expect ( config . NO_PROXY ) . toBeUndefined ( ) ;
73+ expect ( config . SKIP_K8S_JOBS ) . toEqual ( false ) ;
74+ expect ( config . WORKLOADS_TO_SCAN_QUEUE_WORKER_COUNT ) . toEqual ( 10 ) ;
75+ } ) ;
6276} ) ;
You can’t perform that action at this time.
0 commit comments