Skip to content

ssg.products.Product class is handled differently in build system and test suite #10583

@vojtapolasek

Description

@vojtapolasek

Share the context

I was reviewing this PR: #10582

The PR fixes the problem introduced in this PR: #10529 which introduces a new class ssg.products.Product partially mimicking the dict interface.

The PR #10582 is merged eventhough the solution is not ideal (see below) because the impact of the problem was just too big. No Automatus rule tests could be run.

Description of problem:

In the past, before the #10529 was merged, the product_yaml structure representing various product properties was a simple dictionary. Now it is turned into a class which behaves like a dictionary, but it is lacking some features (e.g. currently it does not allow to add a key value pair into its data).
Most of the project (build system) has been modified to live with this fact, but the ssg_test_suite module was not. After the fix mentioned in the PR above, the product_yaml is turned again into a dictionary within the ssg_test_suite.common module and used as a dictionary further in the module. It works, but I believe it introduces a problem because two semantically similar data structures are handled differently in the same project.

Proposed change:

The ssg.products.Product class and very probably the ssg_test_suite code should be modified so that the test suite can use the Product class directly without any hacks.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementGeneral enhancements to the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions