Skip to content

Commit

Permalink
Add unit test for MRAN death
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Jun 11, 2023
1 parent 5947b75 commit 49bdc6c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/test_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 49bdc6c

Please sign in to comment.