-
Notifications
You must be signed in to change notification settings - Fork 107
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
Failures in the collection converted tests #287
Comments
What's the next step here? Do you have suggestions how to address this? Basically both cases need the same/similar solution. In both cases files from the role need to be copied on the system running the tests to be able to run the unit or integration tests. For this both all the necessary test definitions and the python code used by the module in the role need to specified. How are other roles running unit tests? Is the network role the only one with unit tests? |
We don't have any suggestions yet. We noticed this in collections testing and didn't want to forget about it.
No, other roles have unit tests. However, network is the only role that wants to run unit tests as part of integration testing. |
Yes, something like that. I'm sure the are some sort of built-in variables or env. vars. (or even path structure) that can be used to determine if the test is being run against the "old-style" role or the role as a member of a collection. |
Path structure should be easy:
|
FYI, the converted network collections format looks like this.
|
Thanks. This made me realize that the affected tests probably do not need to run for collections as long as they already run in a role context for the platforms that would be used by the collection. Since the tests directly test the python code, moving the files around should not affect the tests. Not sure, when/how the tests will run in connection with the migration to collections. Will ELN/CentOS Stream use collections? Will only the downstream CI run the tests after conversion or will this be part of the upstream CI? |
The conversion to collections rewrites the python code - specifically, the import paths for the network module_utils. Presumably, the unit tests will be testing individual methods/classes in the network module and module_utils files, so it doesn't matter what the module import paths are, because that isn't the subject under test of the unit test. The ability to lookup and import the module using the correct path at runtime is done as part of the integration test (albeit implicitly - that is, there isn't an explicit verification that the
We are planning to have CI that will convert the role into a collection then run the integration tests against the collection.
Not sure what you mean. What is ELN? How do ELN/CentOS Stream currently use the network role?
Both |
ELN is the project name for developing future RHEL releases as part of Fedora: I guess I could also ask, will Fedora Rawhide ship a collection instead of a role in the linux-system-roles package? Will it use the upstream tests to test the collection in their CI? |
Collections conversion tool for linux-system-roles converts the linux-system-roles tree structure to the collection tree structure and replaces the role value with FQCN in the yaml files as well as in the modules/module_utils.
This is just a heads-up; there are 2 cases the conversion tool cannot support.
The text was updated successfully, but these errors were encountered: