Add unit test for MRAN death

pull/1285/head
YuviPanda 2023-06-11 13:10:02 +05:30
rodzic 5947b756ba
commit 49bdc6c048
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -72,3 +72,14 @@ def test_snapshot_rspm_date(base_image):
with pytest.raises(ValueError):
r.get_rspm_snapshot_url(date(1691, 9, 5))
def test_mran_dead(tmpdir, base_image):
tmpdir.chdir()
with open("runtime.txt", "w") as f:
f.write('r-3.6-2017-06-04')
r = buildpacks.RBuildPack(base_image)
with pytest.raises(RuntimeError, match=r'^Microsoft killed MRAN, the source of R package snapshots before 2018-12-07.*'):
r.get_build_scripts()