Skip to content

Commit 49bdc6c

Browse files
committed
Add unit test for MRAN death
1 parent 5947b75 commit 49bdc6c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unit/test_r.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,14 @@ def test_snapshot_rspm_date(base_image):
7272

7373
with pytest.raises(ValueError):
7474
r.get_rspm_snapshot_url(date(1691, 9, 5))
75+
76+
77+
def test_mran_dead(tmpdir, base_image):
78+
tmpdir.chdir()
79+
80+
with open("runtime.txt", "w") as f:
81+
f.write('r-3.6-2017-06-04')
82+
83+
r = buildpacks.RBuildPack(base_image)
84+
with pytest.raises(RuntimeError, match=r'^Microsoft killed MRAN, the source of R package snapshots before 2018-12-07.*'):
85+
r.get_build_scripts()

0 commit comments

Comments
 (0)