Example #1
0
def hue_version():
  global HUE_VERSION
  HUE_VERSION_BAK = HUE_VERSION

  try:
    assert_equal('3.9.0-cdh5.9.0-SNAPSHOT', _version_from_properties(StringIO.StringIO("""# Autogenerated build properties
version=3.9.0-cdh5.9.0-SNAPSHOT
git.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8
cloudera.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8aaaaa""")))

    assert_equal(HUE_DESKTOP_VERSION, _version_from_properties(StringIO.StringIO("""# Autogenerated build properties
version=3.9.0-cdh5.9.0-SNAPSHOT git.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8 cloudera.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8aaaaa""")))

    assert_equal(HUE_DESKTOP_VERSION, _version_from_properties(StringIO.StringIO('')))
  finally:
    HUE_VERSION = HUE_VERSION_BAK
Example #2
0
def hue_version():
  global HUE_VERSION
  HUE_VERSION_BAK = HUE_VERSION

  try:
    assert_equal('3.9.0-cdh5.9.0-SNAPSHOT', _version_from_properties(StringIO.StringIO("""# Autogenerated build properties
version=3.9.0-cdh5.9.0-SNAPSHOT
git.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8
cloudera.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8aaaaa""")))

    assert_equal(HUE_DESKTOP_VERSION, _version_from_properties(StringIO.StringIO("""# Autogenerated build properties
version=3.9.0-cdh5.9.0-SNAPSHOT git.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8 cloudera.hash=f5fbe90b6a1d0c186b0ddc6e65ce5fc8d24725c8aaaaa""")))

    assert_equal(HUE_DESKTOP_VERSION, _version_from_properties(StringIO.StringIO('')))
  finally:
    HUE_VERSION = HUE_VERSION_BAK