diff --git a/Makefile b/Makefile index c751446d..0fc3abf3 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ test: @echo -- $@ -- go test ./... -v -cover -coverprofile netpolicy.coverprofile -test-update: # overrides/ generates tests' expected output files for relevant tests +test-update: # overrides/ generates tests' expected output files for relevant tests +# if the format is dot - generates also png files @echo -- $@ -- go test ./pkg/netpol/connlist/ ./pkg/netpol/diff/ --args --update \ No newline at end of file diff --git a/pkg/internal/testutils/testutils.go b/pkg/internal/testutils/testutils.go index 3740c976..dd265522 100644 --- a/pkg/internal/testutils/testutils.go +++ b/pkg/internal/testutils/testutils.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" "os" + "os/exec" "path/filepath" "strings" "testing" @@ -11,6 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/np-guard/netpol-analyzer/pkg/internal/output" + "github.com/np-guard/netpol-analyzer/pkg/logger" ) // a flag for writing/overriding the golden result files for tests @@ -53,6 +55,11 @@ func CheckActualVsExpectedOutputMatch(t *testing.T, testName, dirName, expectedO if *update { err := output.WriteToFile(actualOutput, expectedOutputFile) require.Nil(t, err, testInfo) + // if format is dot - generate/ override also png graph file using graphviz program + if strings.HasSuffix(expectedOutputFile, dotSign+output.DOTFormat) { + err = generateGraphFilesIfPossible(expectedOutputFile) + require.Nil(t, err, testInfo) + } return } // read expected output file @@ -80,3 +87,28 @@ func CheckErrorContainment(t *testing.T, testInfo, expectedErrorMsg, actualErrMs require.Contains(t, actualErrMsg, expectedErrorMsg, "err/warn message mismatch for test: %q, actual: %q, expected contains: %q", testInfo, actualErrMsg, expectedErrorMsg) } + +const ( + // the executable we need from graphviz is "dot" + executableNameForGraphviz = output.DOTFormat + dotSign = "." +) + +var graphsSuffixes = []string{"png", "svg"} + +// checks if "graphviz" executable exists, if yes runs a cmd to generates a png graph file from the dot output +func generateGraphFilesIfPossible(dotFilePath string) error { + // check if graphviz is installed to continue + if _, err := exec.LookPath(executableNameForGraphviz); err != nil { + logger.NewDefaultLogger().Warnf("dot executable of graphviz was not found. Output Graphs will not be generated") + return nil + } + for _, graphSuffix := range graphsSuffixes { + graphFilePath := dotFilePath + dotSign + graphSuffix + cmd := exec.Command("dot", dotFilePath, "-T"+graphSuffix, "-o", graphFilePath) //nolint:gosec // nosec + if err := cmd.Run(); err != nil { + return err + } + } + return nil +} diff --git a/tests/acs-security-demos-added-workloads/diff_output_from_acs-security-demos.dot.svg b/tests/acs-security-demos-added-workloads/diff_output_from_acs-security-demos.dot.svg new file mode 100644 index 00000000..053820a7 --- /dev/null +++ b/tests/acs-security-demos-added-workloads/diff_output_from_acs-security-demos.dot.svg @@ -0,0 +1,282 @@ + + + + + + + + +cluster_legend + +Legend + + + +backend/catalog[Deployment] + +backend/catalog[Deployment] + + + +backend/checkout[Deployment] + +backend/checkout[Deployment] + + + +backend/notification[Deployment] + +backend/notification[Deployment] + + + +backend/checkout[Deployment]->backend/notification[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment] + +backend/recommendation[Deployment] + + + +backend/checkout[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +payments/gateway[Deployment] + +payments/gateway[Deployment] + + + +backend/checkout[Deployment]->payments/gateway[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment]->backend/catalog[Deployment] + + +TCP 8080 + + + +backend/reports[Deployment] + +backend/reports[Deployment] + + + +backend/reports[Deployment]->backend/catalog[Deployment] + + +TCP 8080 + + + +backend/reports[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +backend/shipping[Deployment] + +backend/shipping[Deployment] + + + +frontend/asset-cache[Deployment] + +frontend/asset-cache[Deployment] + + + +frontend/blog[Deployment] + +frontend/blog[Deployment] + + + +frontend/webapp[Deployment] + +frontend/webapp[Deployment] + + + +frontend/webapp[Deployment]->backend/checkout[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/reports[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/shipping[Deployment] + + +TCP 8080 + + + +payments/mastercard-processor[Deployment] + +payments/mastercard-processor[Deployment] + + + +payments/gateway[Deployment]->payments/mastercard-processor[Deployment] + + +TCP 8080 + + + +payments/visa-processor-v2[Deployment] + +payments/visa-processor-v2[Deployment] + + + +payments/gateway[Deployment]->payments/visa-processor-v2[Deployment] + + +TCP 8080 + + + +payments/visa-processor[Deployment] + +payments/visa-processor[Deployment] + + + +payments/gateway[Deployment]->payments/visa-processor[Deployment] + + +TCP 8080 + + + +zeroday/zeroday[Deployment] + +zeroday/zeroday[Deployment] + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->frontend/asset-cache[Deployment] + + +TCP 8080 + + + +{ingress-controller}->frontend/blog[Deployment] + + +TCP 8080 + + + +{ingress-controller}->frontend/webapp[Deployment] + + +TCP 8080 + + + +{ingress-controller}->zeroday/zeroday[Deployment] + + +TCP 8080 + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.png b/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.png index c31b40cd..9625d6dc 100644 Binary files a/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.png and b/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.png differ diff --git a/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.svg b/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.svg new file mode 100644 index 00000000..0b38d419 --- /dev/null +++ b/tests/acs-security-demos-new/diff_output_from_acs-security-demos.dot.svg @@ -0,0 +1,311 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +external/unicorn[Deployment] + +external/unicorn[Deployment] + + + +0.0.0.0-255.255.255.255->external/unicorn[Deployment] + + +All Connections + + + +backend/catalog[Deployment] + +backend/catalog[Deployment] + + + +backend/checkout[Deployment] + +backend/checkout[Deployment] + + + +backend/notification[Deployment] + +backend/notification[Deployment] + + + +backend/checkout[Deployment]->backend/notification[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment] + +backend/recommendation[Deployment] + + + +backend/checkout[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +backend/checkout[Deployment]->external/unicorn[Deployment] + + +UDP 5353 + + + +payments/gateway[Deployment] + +payments/gateway[Deployment] + + + +backend/checkout[Deployment]->payments/gateway[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment]->backend/catalog[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment]->external/unicorn[Deployment] + + +UDP 5353 + + + +backend/reports[Deployment] + +backend/reports[Deployment] + + + +backend/reports[Deployment]->backend/catalog[Deployment] + + +TCP 9080 (ref1: TCP 8080) + + + +backend/reports[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +backend/reports[Deployment]->external/unicorn[Deployment] + + +UDP 5353 + + + +backend/shipping[Deployment] + +backend/shipping[Deployment] + + + +external/unicorn[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +frontend/webapp[Deployment] + +frontend/webapp[Deployment] + + + +external/unicorn[Deployment]->frontend/webapp[Deployment] + + +TCP 8080 + + + +frontend/asset-cache[Deployment] + +frontend/asset-cache[Deployment] + + + +frontend/webapp[Deployment]->backend/checkout[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/reports[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/shipping[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->external/unicorn[Deployment] + + +UDP 5353 + + + +payments/gateway[Deployment]->external/unicorn[Deployment] + + +UDP 5353 + + + +payments/mastercard-processor[Deployment] + +payments/mastercard-processor[Deployment] + + + +payments/gateway[Deployment]->payments/mastercard-processor[Deployment] + + +TCP 8080 + + + +payments/visa-processor[Deployment] + +payments/visa-processor[Deployment] + + + +payments/gateway[Deployment]->payments/visa-processor[Deployment] + + +TCP 8080 + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->frontend/asset-cache[Deployment] + + +TCP 8080 + + + +{ingress-controller}->frontend/webapp[Deployment] + + +TCP 8080 + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/acs-security-demos/connlist_output.dot.svg b/tests/acs-security-demos/connlist_output.dot.svg new file mode 100644 index 00000000..e7689fa9 --- /dev/null +++ b/tests/acs-security-demos/connlist_output.dot.svg @@ -0,0 +1,182 @@ + + + + + + + + + +backend/catalog[Deployment] + +backend/catalog[Deployment] + + + +backend/checkout[Deployment] + +backend/checkout[Deployment] + + + +backend/notification[Deployment] + +backend/notification[Deployment] + + + +backend/checkout[Deployment]->backend/notification[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment] + +backend/recommendation[Deployment] + + + +backend/checkout[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +payments/gateway[Deployment] + +payments/gateway[Deployment] + + + +backend/checkout[Deployment]->payments/gateway[Deployment] + + +TCP 8080 + + + +backend/recommendation[Deployment]->backend/catalog[Deployment] + + +TCP 8080 + + + +backend/reports[Deployment] + +backend/reports[Deployment] + + + +backend/reports[Deployment]->backend/catalog[Deployment] + + +TCP 8080 + + + +backend/reports[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +backend/shipping[Deployment] + +backend/shipping[Deployment] + + + +frontend/asset-cache[Deployment] + +frontend/asset-cache[Deployment] + + + +frontend/webapp[Deployment] + +frontend/webapp[Deployment] + + + +frontend/webapp[Deployment]->backend/checkout[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/recommendation[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/reports[Deployment] + + +TCP 8080 + + + +frontend/webapp[Deployment]->backend/shipping[Deployment] + + +TCP 8080 + + + +payments/mastercard-processor[Deployment] + +payments/mastercard-processor[Deployment] + + + +payments/gateway[Deployment]->payments/mastercard-processor[Deployment] + + +TCP 8080 + + + +payments/visa-processor[Deployment] + +payments/visa-processor[Deployment] + + + +payments/gateway[Deployment]->payments/visa-processor[Deployment] + + +TCP 8080 + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->frontend/asset-cache[Deployment] + + +TCP 8080 + + + +{ingress-controller}->frontend/webapp[Deployment] + + +TCP 8080 + + + diff --git a/tests/acs_security_frontend_demos/connlist_output.dot.png b/tests/acs_security_frontend_demos/connlist_output.dot.png new file mode 100644 index 00000000..bcaf83aa Binary files /dev/null and b/tests/acs_security_frontend_demos/connlist_output.dot.png differ diff --git a/tests/acs_security_frontend_demos/connlist_output.dot.svg b/tests/acs_security_frontend_demos/connlist_output.dot.svg new file mode 100644 index 00000000..9aeb5a7f --- /dev/null +++ b/tests/acs_security_frontend_demos/connlist_output.dot.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/tests/demo_app_with_routes_and_ingress/connlist_output.dot.svg b/tests/demo_app_with_routes_and_ingress/connlist_output.dot.svg new file mode 100644 index 00000000..fbdb8a6d --- /dev/null +++ b/tests/demo_app_with_routes_and_ingress/connlist_output.dot.svg @@ -0,0 +1,147 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +helloworld/hello-world[Deployment] + +helloworld/hello-world[Deployment] + + + +0.0.0.0-255.255.255.255->helloworld/hello-world[Deployment] + + +All Connections + + + +ingressworld/ingress-world[Deployment] + +ingressworld/ingress-world[Deployment] + + + +0.0.0.0-255.255.255.255->ingressworld/ingress-world[Deployment] + + +All Connections + + + +routeworld/route-world[Deployment] + +routeworld/route-world[Deployment] + + + +0.0.0.0-255.255.255.255->routeworld/route-world[Deployment] + + +All Connections + + + +helloworld/hello-world[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +helloworld/hello-world[Deployment]->ingressworld/ingress-world[Deployment] + + +All Connections + + + +helloworld/hello-world[Deployment]->routeworld/route-world[Deployment] + + +All Connections + + + +ingressworld/ingress-world[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +ingressworld/ingress-world[Deployment]->helloworld/hello-world[Deployment] + + +All Connections + + + +ingressworld/ingress-world[Deployment]->routeworld/route-world[Deployment] + + +All Connections + + + +routeworld/route-world[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +routeworld/route-world[Deployment]->helloworld/hello-world[Deployment] + + +All Connections + + + +routeworld/route-world[Deployment]->ingressworld/ingress-world[Deployment] + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->helloworld/hello-world[Deployment] + + +TCP 8000 + + + +{ingress-controller}->ingressworld/ingress-world[Deployment] + + +TCP 8090 + + + +{ingress-controller}->routeworld/route-world[Deployment] + + +TCP 8060 + + + diff --git a/tests/k8s_ingress_test/connlist_output.dot.svg b/tests/k8s_ingress_test/connlist_output.dot.svg new file mode 100644 index 00000000..11502c47 --- /dev/null +++ b/tests/k8s_ingress_test/connlist_output.dot.svg @@ -0,0 +1,361 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/details-v1-79f774bdb9[ReplicaSet] + +default/details-v1-79f774bdb9[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet] + +default/productpage-v1-6b746f74dc[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet] + +default/ratings-v1-b6994bb9[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet] + +default/reviews-v1-545db77b95[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet] + +default/reviews-v2-7bf8c9648f[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet] + +default/reviews-v3-84779c7bbc[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->default/details-v1-79f774bdb9[ReplicaSet] + + +TCP 9080 + + + diff --git a/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.png b/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.png index 716d472c..bfc62b63 100644 Binary files a/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.png and b/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.png differ diff --git a/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.svg b/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.svg new file mode 100644 index 00000000..ce43d1e5 --- /dev/null +++ b/tests/k8s_ingress_test_new/diff_output_from_k8s_ingress_test.dot.svg @@ -0,0 +1,456 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/details-v1-79f774bdb9[ReplicaSet] + +default/details-v1-79f774bdb9[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet] + +default/productpage-v1-6b746f74dc[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet] + +default/ratings-v1-b6994bb9[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet] + +default/reviews-v1-545db77b95[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet] + +default/reviews-v2-7bf8c9648f[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet] + +default/reviews-v3-84779c7bbc[ReplicaSet] + + + +0.0.0.0-255.255.255.255->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/unicorn[Deployment] + +default/unicorn[Deployment] + + + +0.0.0.0-255.255.255.255->default/unicorn[Deployment] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/details-v1-79f774bdb9[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/productpage-v1-6b746f74dc[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/ratings-v1-b6994bb9[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/reviews-v1-545db77b95[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v2-7bf8c9648f[ReplicaSet]->default/reviews-v3-84779c7bbc[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/details-v1-79f774bdb9[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/productpage-v1-6b746f74dc[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/ratings-v1-b6994bb9[ReplicaSet] + + +TCP 9080 (ref1: All Connections) + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/reviews-v1-545db77b95[ReplicaSet] + + +All Connections + + + +default/reviews-v3-84779c7bbc[ReplicaSet]->default/reviews-v2-7bf8c9648f[ReplicaSet] + + +All Connections + + + +default/unicorn[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/unicorn[Deployment]->default/details-v1-79f774bdb9[ReplicaSet] + + +TCP 9080 + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->default/details-v1-79f774bdb9[ReplicaSet] + + +TCP 9080 + + + +{ingress-controller}->default/unicorn[Deployment] + + +TCP 8080 + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/multiple_ingress_objects_with_different_ports/connlist_output.dot.svg b/tests/multiple_ingress_objects_with_different_ports/connlist_output.dot.svg new file mode 100644 index 00000000..233c729b --- /dev/null +++ b/tests/multiple_ingress_objects_with_different_ports/connlist_output.dot.svg @@ -0,0 +1,51 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +ingressworld/ingress-world-multiple-ports[Deployment] + +ingressworld/ingress-world-multiple-ports[Deployment] + + + +0.0.0.0-255.255.255.255->ingressworld/ingress-world-multiple-ports[Deployment] + + +All Connections + + + +ingressworld/ingress-world-multiple-ports[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->ingressworld/ingress-world-multiple-ports[Deployment] + + +TCP 8050,8090 + + + diff --git a/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.png b/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.png index 8c33bcd5..1f09f9d0 100644 Binary files a/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.png and b/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.png differ diff --git a/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.svg b/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.svg new file mode 100644 index 00000000..2d85b7c2 --- /dev/null +++ b/tests/multiple_ingress_objects_with_different_ports_new/diff_output_from_multiple_ingress_objects_with_different_ports.dot.svg @@ -0,0 +1,112 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +ingressworld/ingress-world-multiple-ports[Deployment] + +ingressworld/ingress-world-multiple-ports[Deployment] + + + +0.0.0.0-255.255.255.255->ingressworld/ingress-world-multiple-ports[Deployment] + + +All Connections + + + +ingressworld/ingress-world-multiple-ports[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->ingressworld/ingress-world-multiple-ports[Deployment] + + +TCP 8000,8090 (ref1: TCP 8050,8090) + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.png b/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.png index b4070c57..4c987ee6 100644 Binary files a/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.png and b/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.png differ diff --git a/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.svg b/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.svg new file mode 100644 index 00000000..fb189d83 --- /dev/null +++ b/tests/netpol-diff-example-minimal/diff_output_from_netpol-analysis-example-minimal.dot.svg @@ -0,0 +1,119 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/backend[Deployment] + +default/backend[Deployment] + + + +0.0.0.0-255.255.255.255->default/backend[Deployment] + + +TCP 9090 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +0.0.0.0-255.255.255.255->default/frontend[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->0.0.0.0-255.255.255.255 + + +UDP 53 + + + +default/frontend[Deployment]->default/backend[Deployment] + + +TCP 9090,UDP 53 (ref1: TCP 9090) + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/one_ingress_multiple_ports/connlist_output.dot.svg b/tests/one_ingress_multiple_ports/connlist_output.dot.svg new file mode 100644 index 00000000..acfc28cb --- /dev/null +++ b/tests/one_ingress_multiple_ports/connlist_output.dot.svg @@ -0,0 +1,51 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +ingressworld/ingress-world-multiple-ports[Deployment] + +ingressworld/ingress-world-multiple-ports[Deployment] + + + +0.0.0.0-255.255.255.255->ingressworld/ingress-world-multiple-ports[Deployment] + + +All Connections + + + +ingressworld/ingress-world-multiple-ports[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->ingressworld/ingress-world-multiple-ports[Deployment] + + +TCP 8000,8090 + + + diff --git a/tests/one_ingress_multiple_services/connlist_output.dot.svg b/tests/one_ingress_multiple_services/connlist_output.dot.svg new file mode 100644 index 00000000..acfc28cb --- /dev/null +++ b/tests/one_ingress_multiple_services/connlist_output.dot.svg @@ -0,0 +1,51 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +ingressworld/ingress-world-multiple-ports[Deployment] + +ingressworld/ingress-world-multiple-ports[Deployment] + + + +0.0.0.0-255.255.255.255->ingressworld/ingress-world-multiple-ports[Deployment] + + +All Connections + + + +ingressworld/ingress-world-multiple-ports[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +{ingress-controller} + +{ingress-controller} + + + +{ingress-controller}->ingressworld/ingress-world-multiple-ports[Deployment] + + +TCP 8000,8090 + + + diff --git a/tests/onlineboutique_workloads/connlist_output.dot.svg b/tests/onlineboutique_workloads/connlist_output.dot.svg new file mode 100644 index 00000000..df5ca046 --- /dev/null +++ b/tests/onlineboutique_workloads/connlist_output.dot.svg @@ -0,0 +1,209 @@ + + + + + + + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/redis-cart[Deployment] + +default/redis-cart[Deployment] + + + +0.0.0.0-255.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +default/adservice[Deployment] + +default/adservice[Deployment] + + + +default/cartservice[Deployment] + +default/cartservice[Deployment] + + + +default/checkoutservice[Deployment] + +default/checkoutservice[Deployment] + + + +default/checkoutservice[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/currencyservice[Deployment] + +default/currencyservice[Deployment] + + + +default/checkoutservice[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/emailservice[Deployment] + +default/emailservice[Deployment] + + + +default/checkoutservice[Deployment]->default/emailservice[Deployment] + + +TCP 8080 + + + +default/paymentservice[Deployment] + +default/paymentservice[Deployment] + + + +default/checkoutservice[Deployment]->default/paymentservice[Deployment] + + +TCP 50051 + + + +default/productcatalogservice[Deployment] + +default/productcatalogservice[Deployment] + + + +default/checkoutservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/shippingservice[Deployment] + +default/shippingservice[Deployment] + + + +default/checkoutservice[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +default/frontend[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/frontend[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/frontend[Deployment]->default/checkoutservice[Deployment] + + +TCP 5050 + + + +default/frontend[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/frontend[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/recommendationservice[Deployment] + +default/recommendationservice[Deployment] + + + +default/frontend[Deployment]->default/recommendationservice[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/loadgenerator[Deployment] + +default/loadgenerator[Deployment] + + + +default/loadgenerator[Deployment]->default/frontend[Deployment] + + +TCP 8080 + + + +default/recommendationservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/redis-cart[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + diff --git a/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.png b/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.png new file mode 100644 index 00000000..c1050ce4 Binary files /dev/null and b/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.png differ diff --git a/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.svg b/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.svg new file mode 100644 index 00000000..44ff62d1 --- /dev/null +++ b/tests/onlineboutique_workloads_changed_netpols/TsetOutputWithArgNamesOption.dot.svg @@ -0,0 +1,303 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-127.255.255.255 + +0.0.0.0-127.255.255.255 + + + +default/redis-cart[Deployment] + +default/redis-cart[Deployment] + + + +0.0.0.0-127.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +128.0.0.0-255.255.255.255 + +128.0.0.0-255.255.255.255 + + + +128.0.0.0-255.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +default/adservice[Deployment] + +default/adservice[Deployment] + + + +default/cartservice[Deployment] + +default/cartservice[Deployment] + + + +default/emailservice[Deployment] + +default/emailservice[Deployment] + + + +default/cartservice[Deployment]->default/emailservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment] + +default/checkoutservice[Deployment] + + + +default/checkoutservice[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment]->default/cartservice[Deployment] + + +TCP 8000 (old: TCP 7070) + + + +default/currencyservice[Deployment] + +default/currencyservice[Deployment] + + + +default/checkoutservice[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/checkoutservice[Deployment]->default/emailservice[Deployment] + + +TCP 8080,9555 (old: TCP 8080) + + + +default/paymentservice[Deployment] + +default/paymentservice[Deployment] + + + +default/checkoutservice[Deployment]->default/paymentservice[Deployment] + + +TCP 50051 + + + +default/productcatalogservice[Deployment] + +default/productcatalogservice[Deployment] + + + +default/checkoutservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/shippingservice[Deployment] + +default/shippingservice[Deployment] + + + +default/checkoutservice[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +default/frontend[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/frontend[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/frontend[Deployment]->default/checkoutservice[Deployment] + + +TCP 5050 + + + +default/frontend[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/frontend[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/recommendationservice[Deployment] + +default/recommendationservice[Deployment] + + + +default/frontend[Deployment]->default/recommendationservice[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/loadgenerator[Deployment] + +default/loadgenerator[Deployment] + + + +default/loadgenerator[Deployment]->default/frontend[Deployment] + + +TCP 8080 + + + +default/recommendationservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/redis-cart[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.png b/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.png index c1050ce4..5e54ba6c 100644 Binary files a/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.png and b/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.png differ diff --git a/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.svg b/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.svg new file mode 100644 index 00000000..dfb7a014 --- /dev/null +++ b/tests/onlineboutique_workloads_changed_netpols/diff_output_from_onlineboutique_workloads.dot.svg @@ -0,0 +1,303 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-127.255.255.255 + +0.0.0.0-127.255.255.255 + + + +default/redis-cart[Deployment] + +default/redis-cart[Deployment] + + + +0.0.0.0-127.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +128.0.0.0-255.255.255.255 + +128.0.0.0-255.255.255.255 + + + +128.0.0.0-255.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +default/adservice[Deployment] + +default/adservice[Deployment] + + + +default/cartservice[Deployment] + +default/cartservice[Deployment] + + + +default/emailservice[Deployment] + +default/emailservice[Deployment] + + + +default/cartservice[Deployment]->default/emailservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment] + +default/checkoutservice[Deployment] + + + +default/checkoutservice[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment]->default/cartservice[Deployment] + + +TCP 8000 (ref1: TCP 7070) + + + +default/currencyservice[Deployment] + +default/currencyservice[Deployment] + + + +default/checkoutservice[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/checkoutservice[Deployment]->default/emailservice[Deployment] + + +TCP 8080,9555 (ref1: TCP 8080) + + + +default/paymentservice[Deployment] + +default/paymentservice[Deployment] + + + +default/checkoutservice[Deployment]->default/paymentservice[Deployment] + + +TCP 50051 + + + +default/productcatalogservice[Deployment] + +default/productcatalogservice[Deployment] + + + +default/checkoutservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/shippingservice[Deployment] + +default/shippingservice[Deployment] + + + +default/checkoutservice[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +default/frontend[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/frontend[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/frontend[Deployment]->default/checkoutservice[Deployment] + + +TCP 5050 + + + +default/frontend[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/frontend[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/recommendationservice[Deployment] + +default/recommendationservice[Deployment] + + + +default/frontend[Deployment]->default/recommendationservice[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/loadgenerator[Deployment] + +default/loadgenerator[Deployment] + + + +default/loadgenerator[Deployment]->default/frontend[Deployment] + + +TCP 8080 + + + +default/recommendationservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/redis-cart[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.png b/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.png index 0d6c2335..57685b12 100644 Binary files a/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.png and b/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.png differ diff --git a/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.svg b/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.svg new file mode 100644 index 00000000..6af4ecea --- /dev/null +++ b/tests/onlineboutique_workloads_changed_netpols_and_workloads/diff_output_from_onlineboutique_workloads.dot.svg @@ -0,0 +1,323 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-127.255.255.255 + +0.0.0.0-127.255.255.255 + + + +default/redis-cart[Deployment] + +default/redis-cart[Deployment] + + + +0.0.0.0-127.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/unicorn[Deployment] + +default/unicorn[Deployment] + + + +0.0.0.0-255.255.255.255->default/unicorn[Deployment] + + +All Connections + + + +128.0.0.0-255.255.255.255 + +128.0.0.0-255.255.255.255 + + + +128.0.0.0-255.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +default/adservice[Deployment] + +default/adservice[Deployment] + + + +default/cartservice[Deployment] + +default/cartservice[Deployment] + + + +default/emailservice[Deployment] + +default/emailservice[Deployment] + + + +default/cartservice[Deployment]->default/emailservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment] + +default/checkoutservice[Deployment] + + + +default/checkoutservice[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/checkoutservice[Deployment]->default/cartservice[Deployment] + + +TCP 8000 (ref1: TCP 7070) + + + +default/currencyservice[Deployment] + +default/currencyservice[Deployment] + + + +default/checkoutservice[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/checkoutservice[Deployment]->default/emailservice[Deployment] + + +TCP 8080,9555 (ref1: TCP 8080) + + + +default/paymentservice[Deployment] + +default/paymentservice[Deployment] + + + +default/checkoutservice[Deployment]->default/paymentservice[Deployment] + + +TCP 50051 + + + +default/productcatalogservice[Deployment] + +default/productcatalogservice[Deployment] + + + +default/checkoutservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/shippingservice[Deployment] + +default/shippingservice[Deployment] + + + +default/checkoutservice[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +default/frontend[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/frontend[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/frontend[Deployment]->default/checkoutservice[Deployment] + + +TCP 5050 + + + +default/frontend[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/frontend[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/recommendationservice[Deployment] + +default/recommendationservice[Deployment] + + + +default/frontend[Deployment]->default/recommendationservice[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/loadgenerator[Deployment] + +default/loadgenerator[Deployment] + + + +default/loadgenerator[Deployment]->default/frontend[Deployment] + + +TCP 8080 + + + +default/recommendationservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/redis-cart[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/unicorn[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + + diff --git a/tests/onlineboutique_workloads_changed_workloads/diff_output_from_onlineboutique_workloads.dot.svg b/tests/onlineboutique_workloads_changed_workloads/diff_output_from_onlineboutique_workloads.dot.svg new file mode 100644 index 00000000..8e361f53 --- /dev/null +++ b/tests/onlineboutique_workloads_changed_workloads/diff_output_from_onlineboutique_workloads.dot.svg @@ -0,0 +1,304 @@ + + + + + + + + +cluster_legend + +Legend + + + +0.0.0.0-255.255.255.255 + +0.0.0.0-255.255.255.255 + + + +default/redis-cart[Deployment] + +default/redis-cart[Deployment] + + + +0.0.0.0-255.255.255.255->default/redis-cart[Deployment] + + +All Connections + + + +default/unicorn[Deployment] + +default/unicorn[Deployment] + + + +0.0.0.0-255.255.255.255->default/unicorn[Deployment] + + +All Connections + + + +default/adservice[Deployment] + +default/adservice[Deployment] + + + +default/cartservice[Deployment] + +default/cartservice[Deployment] + + + +default/checkoutservice[Deployment] + +default/checkoutservice[Deployment] + + + +default/checkoutservice[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/currencyservice[Deployment] + +default/currencyservice[Deployment] + + + +default/checkoutservice[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/emailservice[Deployment] + +default/emailservice[Deployment] + + + +default/checkoutservice[Deployment]->default/emailservice[Deployment] + + +TCP 8080 + + + +default/paymentservice[Deployment] + +default/paymentservice[Deployment] + + + +default/checkoutservice[Deployment]->default/paymentservice[Deployment] + + +TCP 50051 + + + +default/productcatalogservice[Deployment] + +default/productcatalogservice[Deployment] + + + +default/checkoutservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/shippingservice[Deployment] + +default/shippingservice[Deployment] + + + +default/checkoutservice[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/frontend[Deployment] + +default/frontend[Deployment] + + + +default/frontend[Deployment]->default/adservice[Deployment] + + +TCP 9555 + + + +default/frontend[Deployment]->default/cartservice[Deployment] + + +TCP 7070 + + + +default/frontend[Deployment]->default/checkoutservice[Deployment] + + +TCP 5050 + + + +default/frontend[Deployment]->default/currencyservice[Deployment] + + +TCP 7000 + + + +default/frontend[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/recommendationservice[Deployment] + +default/recommendationservice[Deployment] + + + +default/frontend[Deployment]->default/recommendationservice[Deployment] + + +TCP 8080 + + + +default/frontend[Deployment]->default/shippingservice[Deployment] + + +TCP 50051 + + + +default/loadgenerator[Deployment] + +default/loadgenerator[Deployment] + + + +default/loadgenerator[Deployment]->default/frontend[Deployment] + + +TCP 8080 + + + +default/recommendationservice[Deployment]->default/productcatalogservice[Deployment] + + +TCP 3550 + + + +default/redis-cart[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/redis-cart[Deployment]->default/unicorn[Deployment] + + +All Connections + + + +default/unicorn[Deployment]->0.0.0.0-255.255.255.255 + + +All Connections + + + +default/unicorn[Deployment]->default/redis-cart[Deployment] + + +All Connections + + + + + +a->b + + +added connection + + + + + +c->d + + +removed connection + + + + + +e->f + + +changed connection + + + + + +g->h + + +unchanged connection + + + +np + +new peer + + + +lp + +lost peer + + + + +pp + +persistent peer + + + +