def test_nitrogen_given_int(self): """Pass Nitrogen major version, check that Java 8 returned.""" java_version = lib.get_java_version(7) self.assertEqual(java_version, 8)
def test_oxygen_given_str(self): """Pass Oxygen major version, check that Java 8 returned.""" java_version = lib.get_java_version("8") self.assertEqual(java_version, 8)
def test_old_given_str(self): """Pass old ODL major version, check that Java 7 returned.""" java_version = lib.get_java_version("4") self.assertEqual(java_version, 7)
def test_carbon_given_str(self): """Pass Carbon major version, check that Java 8 returned.""" java_version = lib.get_java_version("6") self.assertEqual(java_version, 8)
def test_type_given_str(self): """Pass int, check that returned value is of the right type.""" java_version = lib.get_java_version("6") self.assertIsInstance(java_version, int)
else: build.update({"sysd_commit": lib.get_sysd_commit()}) # Argparse rules imply args.major will only be present for latest_snap # builds and args.download_url will only be present for generic builds. # If doing a latest-snap build, find latest build tarball URL for given # major version and add to build definition. Else, add URL directly. if hasattr(args, "major"): build.update({"download_url": lib.get_snap_url(args.major)}) else: build.update({"download_url": args.download_url}) # Use download_url to find pkg version, add to build def build.update(lib.extract_version(build["download_url"])) # Karaf 3 distros use distribution-karaf-, Karaf 4 uses karaf- build.update({ "distro_name_prefix": lib.get_distro_name_prefix(build['version_major']) }) # Update build definition with Java version required by ODL version build.update( {"java_version": lib.get_java_version(build['version_major'])}) # Use package-specific helper logic to do the specified build if args.rpm: rpm_lib.build_rpm(build) elif args.deb: deb_lib.build_deb(build)
def test_neon_given_str(self): """Pass Neon major version as str, check that Java 8 returned.""" java_version = lib.get_java_version("10") self.assertEqual(java_version, 8)
def test_neon_given_int(self): """Pass Neon major version as int, check that Java 8 returned.""" java_version = lib.get_java_version(10) self.assertEqual(java_version, 8)
def test_fluorine_given_str(self): """Pass Fluorine major version as str, check that Java 8 returned.""" java_version = lib.get_java_version("9") self.assertEqual(java_version, 8)