#697 Fix the transitive dependency resolving to include only active modules.
Merged 7 years ago by ralph. Opened 7 years ago by jkaluza.
jkaluza/fm-orchestrator pdc-get_variant_dict-active  into  master

@@ -127,6 +127,9 @@ 

          if 'release' in data:

              result['variant_release'] = data['release']

  

+         if 'active' in data:

+             result['active'] = data['active']

+ 

      if not result:

          raise ValueError("Couldn't get variant_dict from %s" % data)

  

file modified
+18
@@ -51,6 +51,24 @@ 

      def tearDown(self):

          self.vcr.__exit__()

  

+     def test_get_variant_dict_module_dict_active(self):

+         """

+         Tests that "active" is honored by get_variant_dict(...).

+         """

+         dep = {

+             'name': "platform",

+             'version': "master",

+             'active': True,

+         }

+         expected = {

+             'active': True,

+             'variant_id': 'platform',

+             'variant_version': 'master'

+         }

+ 

+         variant_dict = mbs_pdc.get_variant_dict(dep)

+         self.assertEqual(variant_dict, expected)

+ 

      def test_get_module_simple_as_dict(self):

          query = {'name': 'testmodule', 'version': 'master'}

          result = mbs_pdc.get_module(self.pdc, query)