np-guard / netpol-analyzer

A Golang library for analyzing k8s connectivity-configuration resources (a.k.a. network policies)
Apache License 2.0
9 stars 2 forks source link

exposure analysis test #316

Closed shireenf-ibm closed 5 months ago

shireenf-ibm commented 6 months ago

issue #236

sub task :

    • [ ] basic tests for exposure analysis results
shireenf-ibm commented 5 months ago

another question: do we handle containment of labels for representative peers? for example, a potential connection to ns with label {A: val1} and with conn: all , is including also a potential connection to ns with labels {A: val1, B: val2} , for all contained connections. (which makes such a potential connection redundant).

If not, this can be considered in a separate issue.

it is not handled (added a new task )

shireenf-ibm commented 5 months ago

I find it confusing that the new tests dir for exposure analysis is placed within the the dir of other tests

What do you suggest?

the thing is that the tests dir is our global testing dir (those tests will be also used in the connlist_analyzer_test too for output testing; i.e will be added to the good path tests with the new flag of exposure analysis); so are assumed to be under tests. I grouped them under a tests/exposure_analysis_tests so I can easily remember and find the new tests