Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Ensure default config should not create ConfigMap for Polaris when it is not chosen as plugin #530

Merged
merged 1 commit into from Apr 23, 2021

Conversation

danielpacak
Copy link
Contributor

Resolves: #524

Signed-off-by: Daniel Pacak pacak.daniel@gmail.com

…hen it is not chosen as plugin

Resolves: #524

Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
apiVersion: v1
kind: ConfigMap
metadata:
name: starboard-conftest-config
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static YAMLs hardcode config audit plugin to Polaris so we won't create ConfigMap for Conftest

@@ -324,67 +325,204 @@ func TestConfigManager_Read(t *testing.T) {

func TestConfigManager_EnsureDefault(t *testing.T) {

t.Run("Should create ConfigMap with default values, and empty secret", func(t *testing.T) {
t.Run("Should create ConfigMaps and Secret", func(t *testing.T) {
g := gomega.NewGomegaWithT(t)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gomega is more flexible and expressive than testify. We also use Gomega in integration tests so I'd like to stick to Gomega for new code.

@codecov
Copy link

codecov bot commented Apr 23, 2021

Codecov Report

Merging #530 (448844f) into main (21e893c) will increase coverage by 0.12%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
+ Coverage   70.70%   70.83%   +0.12%     
==========================================
  Files          63       63              
  Lines        4028     4042      +14     
==========================================
+ Hits         2848     2863      +15     
+ Misses        871      866       -5     
- Partials      309      313       +4     
Impacted Files Coverage Δ
pkg/starboard/config.go 74.85% <81.81%> (+4.26%) ⬆️
pkg/operator/controller/ciskubebenchreport.go 62.22% <0.00%> (-1.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca59eb2...448844f. Read the comment docs.

@danielpacak danielpacak merged commit f7d8d46 into main Apr 23, 2021
@danielpacak danielpacak deleted the issue_524 branch April 23, 2021 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure default config should not create ConfigMap for Polaris when it is not chosen as plugin
2 participants