the tests were not running on the pull request because the only github workflow running unit test is restricted to test/datadog-operator/** and charts/datadog-operator/** paths
Special notes for your reviewer:
I'm not 100% sure of the best path forward about this.
I went for using helm.DiffAgainstSnapshot which made bump a few dependencies.
It also seems like tests from other packages are also not working so not sure what we should do about them. This is fixed
I more or less copy pasted the github workflow definition for datadog-operator, maybe there is a better solution ?
What this PR does / why we need it:
I initially wanted to do it in https://github.com/DataDog/helm-charts/pull/1529 but I found out that my implementation
was only making assertions on the service-account, all other resources were not checked. I believe this is due to the fact that
common.Unmarshal(t, manifest, &actual)
andcommon.LoadFromFile(t, baselineManifestPath, &baseline)
actually only read the first entry from the yaml and ignores the following ones (not 100% sure about this but it matches my observation) https://github.com/DataDog/helm-charts/blob/8a47e13299271835d199715d3d5f76cb44e54c38/test/private-action-runner/baseline_test.go#L67-L81 https://github.com/DataDog/helm-charts/blob/8a47e13299271835d199715d3d5f76cb44e54c38/test/private-action-runner/baseline/Private_Action_Runner_default.yaml#L1-L27the tests were not running on the pull request because the only github workflow running unit test is restricted to
test/datadog-operator/**
andcharts/datadog-operator/**
pathsSpecial notes for your reviewer:
I'm not 100% sure of the best path forward about this.
helm.DiffAgainstSnapshot
which made bump a few dependencies.It also seems like tests from other packages are also not working so not sure what we should do about them.This is fixed