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

Extends tests for ModuleStream.depends_on_stream() #203

Closed

Conversation

athira-selvam
Copy link
Contributor

The tests for depends_on_stream() and build_depends_on_stream() is modified to handle empty lists
Replicates the existing python tests, and newly added tests for depends_on_stream to C.
Fixes : #192
related: #199

The tests for depends_on_stream() and build_depends_on_stream() is modified to handle empty lists
Replicates the existing python tests, and newly added tests for depends_on_stream to C.
Fixes : fedora-modularity#192
related:  fedora-modularity#199
Copy link
Collaborator

@sgallagher sgallagher left a comment

Choose a reason for hiding this comment

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

I think you misunderstood the requirement here. Issue #192 is about dealing with a YAML document that includes a streamname: [] block under the dependencies.

@@ -1035,8 +1034,16 @@ def test_depends_on_stream(self):
stream.build_depends_on_stream(
'platform', 'f28'), False)

self.assertEqual(stream.depends_on_stream('base', 'f30'), False)
self.assertEqual(stream.depends_on_stream('base', 'f30'), False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you removing these two tests? Though, the second one should have been stream.build_depends_on_stream(), That's a bug in the original code here.

@@ -682,7 +682,6 @@ def test_v2_yaml(self):

assert 'rawhide' in stream.get_servicelevel_names()
assert 'production' in stream.get_servicelevel_names()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why delete this line?

self.assertEqual(stream.depends_on_stream('base', 'f30'), False)
self.assertEqual(
stream.depends_on_stream(
'base', ''), False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you misunderstood the requirement here. We don't need tests for a stream name being the empty string. We need a new requires/buildrequires in the v2 YAML document. Something like perl in:

  dependencies:
  - buildrequires:
      platform: [ f30 ]
      perl: []
    requires:
      platform: [ -f28 ]
      perl: []

This test is ONLY for ModuleStreamV2, since there is no way to represent this in the ModuleStreamV1 YAML.

@sgallagher
Copy link
Collaborator

Tracking this in #210

Please do not file new PRs each time. Just update the current one by pushing to this branch.

@sgallagher sgallagher closed this Mar 12, 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.

2 participants