'A range of versions can be upgraded and the configuration
blob after upgrade will match that which is expected for the
particular version.
See flocker/control/test/configurations for individual
version JSON files and generation code.'

@given(st.tuples(SUPPORTED_VERSIONS, SUPPORTED_VERSIONS).map((lambda x: tuple(sorted(x)))))
def test_upgrade_configuration_versions(self, versions):

    (source_version, target_version) = versions
    configs_dir = FilePath(__file__).sibling('configurations')
    source_json_glob = ('configuration_*_v%d.json' % source_version)
    source_jsons = sorted(configs_dir.globChildren(source_json_glob), key=(lambda x: x.basename()))
    config_num = int(source_jsons[(-1)].basename().split('_')[1])
    source_json_file = ('configuration_%d_v%d.json' % (config_num, versions[0]))
    target_json_file = ('configuration_%d_v%d.json' % (config_num, versions[1]))
    source_json = configs_dir.child(source_json_file).getContent()
    target_json = configs_dir.child(target_json_file).getContent()
    upgraded_json = migrate_configuration(source_version, target_version, source_json, ConfigurationMigration)
    self.assertEqual(json.loads(upgraded_json), json.loads(target_json))
