| 94 | end |
| 95 | |
| 96 | def test_linux_packages |
| 97 | user = "Arrow Developers" |
| 98 | email = "dev@arrow.apache.org" |
| 99 | stdout = prepare("LINUX_PACKAGES", |
| 100 | "DEBFULLNAME" => user, |
| 101 | "DEBEMAIL" => email) |
| 102 | changes = parse_patch(git("log", "-n", "1", "-p")) |
| 103 | sampled_changes = changes.collect do |change| |
| 104 | { |
| 105 | path: change[:path], |
| 106 | sampled_hunks: change[:hunks].collect(&:first), |
| 107 | } |
| 108 | end |
| 109 | base_dir = "dev/tasks/linux-packages" |
| 110 | today = Time.now.utc.strftime("%a %b %d %Y") |
| 111 | expected_changes = [ |
| 112 | { |
| 113 | path: "#{base_dir}/apache-arrow-apt-source/debian/changelog", |
| 114 | sampled_hunks: [ |
| 115 | "+apache-arrow-apt-source (#{@release_version}-1) " + |
| 116 | "unstable; urgency=low", |
| 117 | ], |
| 118 | }, |
| 119 | { |
| 120 | path: "#{base_dir}/apache-arrow-release/yum/apache-arrow-release.spec.in", |
| 121 | sampled_hunks: [ |
| 122 | "+* #{today} #{user} <#{email}> - #{@release_version}-1", |
| 123 | ], |
| 124 | }, |
| 125 | { |
| 126 | path: "#{base_dir}/apache-arrow/debian/changelog", |
| 127 | sampled_hunks: [ |
| 128 | "+apache-arrow (#{@release_version}-1) unstable; urgency=low", |
| 129 | ], |
| 130 | }, |
| 131 | { |
| 132 | path: "#{base_dir}/apache-arrow/yum/arrow.spec.in", |
| 133 | sampled_hunks: [ |
| 134 | "+* #{today} #{user} <#{email}> - #{@release_version}-1", |
| 135 | ], |
| 136 | }, |
| 137 | ] |
| 138 | assert_equal(expected_changes, sampled_changes, "Output:\n#{stdout}") |
| 139 | end |
| 140 | |
| 141 | data(:next_release_type, [:major, :minor, :patch]) |
| 142 | def test_version_pre_tag |
nothing calls this directly
no outgoing calls
no test coverage detected