Skip to content

Update datastream file fixtures#13

Merged
dLobatog merged 2 commits intoOpenSCAP:masterfrom
akofink:update-datastream-fixtures
Oct 10, 2019
Merged

Update datastream file fixtures#13
dLobatog merged 2 commits intoOpenSCAP:masterfrom
akofink:update-datastream-fixtures

Conversation

@akofink
Copy link
Copy Markdown
Collaborator

@akofink akofink commented Sep 9, 2019

I'm expecting tests to fail here. @xprazak2 you wrote some of the failing validations - I wonder if you based the namespace requirement on the SCAP spec or just from an example datastream file? These three datastreams were downloaded from the ComplianceAsCode repo's latest release: https://github.com/ComplianceAsCode/content/releases/download/v0.1.46/scap-security-guide-0.1.46.zip

None of the three are 'valid' as written:

[1] pry(#<DsTest>)> create_parser('ssg-rhel7-ds.xml').valid?
=> false
[2] pry(#<DsTest>)> create_parser('ssg-rhel6-ds.xml').valid?
=> false
[3] pry(#<DsTest>)> create_parser('ssg-rhel8-ds.xml').valid?
=> false

Signed-off-by: Andrew Kofink akofink@redhat.com

Copy link
Copy Markdown
Contributor

@dLobatog dLobatog left a comment

Choose a reason for hiding this comment

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

@akofink Looks like also test/ds_test.rb:21 has to be changed to include the names of the new datastreams

@akofink
Copy link
Copy Markdown
Collaborator Author

akofink commented Sep 10, 2019

It does, but the validation looking for namespaces still fails. I need to figure this out.

@xprazak2
Copy link
Copy Markdown
Collaborator

@akofink, I just took it from the file. The check is failing because the new file contains completely different namespaces:

ds-before

ds-after

maybe because scap-version changed to 1.3?

@akofink
Copy link
Copy Markdown
Collaborator Author

akofink commented Sep 17, 2019

Right, so my question is about the namespaces. Why did we add the validations there? Is it okay to remove the namespace validation now?

@xprazak2
Copy link
Copy Markdown
Collaborator

I think you can remove them if it helps you move forward. I wanted some basic check that the file is really what we expect so I added validations for namespaces, because I did not think they would change.

@akofink
Copy link
Copy Markdown
Collaborator Author

akofink commented Sep 23, 2019

Finally updated. The list of profiles was missing one for xccdf_org.ssgproject.content_profile_pci-dss_centric which has the same title as xccdf_org.ssgproject.content_profile_pci-dss. I've updated the test to use profile ref_ids instead.

Copy link
Copy Markdown
Contributor

@dLobatog dLobatog left a comment

Choose a reason for hiding this comment

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

@akofink Almost there, please rebase with master and let's :shipit: - thanks!

Signed-off-by: Andrew Kofink <akofink@redhat.com>
@akofink
Copy link
Copy Markdown
Collaborator Author

akofink commented Oct 1, 2019

Rebased

@dLobatog dLobatog merged commit f9c2d54 into OpenSCAP:master Oct 10, 2019
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.

3 participants