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

Change api, Add support for s3 bucket resource and better cft loader #865

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

sigmabaryon
Copy link
Contributor

Changed iac loader
Added Load-file tests
Improved Load dir tests not right

@sonarcloud
Copy link

sonarcloud bot commented Jun 15, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #865 (b45ab40) into master (95aba12) will increase coverage by 0.55%.
The diff coverage is 85.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #865      +/-   ##
==========================================
+ Coverage   78.22%   78.77%   +0.55%     
==========================================
  Files         162      166       +4     
  Lines        4354     4406      +52     
==========================================
+ Hits         3406     3471      +65     
+ Misses        734      720      -14     
- Partials      214      215       +1     
Impacted Files Coverage Δ
pkg/mapper/iac-providers/cft/config/s3-bucket.go 81.81% <81.81%> (ø)
pkg/iac-providers/cft/v1/load-file.go 80.76% <84.61%> (+24.62%) ⬆️
pkg/mapper/iac-providers/cft/cft.go 94.91% <87.50%> (ø)
...apper/iac-providers/cft/config/s3-bucket-policy.go 100.00% <100.00%> (ø)
pkg/policy/opa/engine.go 59.36% <0.00%> (-5.04%) ⬇️
pkg/iac-providers/tfplan/v1/load-file.go 74.19% <0.00%> (-3.59%) ⬇️
pkg/utils/skip_rules.go 93.33% <0.00%> (-0.42%) ⬇️
pkg/policy/types.go 100.00% <0.00%> (ø)
pkg/iac-providers/output/types.go 100.00% <0.00%> (ø)
... and 7 more

if allResourceConfigs[name] == nil {
t.Errorf("resource Type %s from test data %s not found", name, resourceDir)
}
for _, testResource := range resources {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @sigmabaryon, I was wondering if deepEqual would have worked here? Because we are validating if the ID is present or not, but not validating other fields of the config resource.

pkg/iac-providers/cft/v1/load-dir_test.go Show resolved Hide resolved
@patilpankaj212 patilpankaj212 merged commit bcc4cf2 into tenable:master Jun 23, 2021
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.

2 participants