Skip to content

Commit

Permalink
Add test for package deletion analysis
Browse files Browse the repository at this point in the history
Currently, the analysis phase doesn't expect any package deletions and
fails with the error "impossible". But, with the new opam-repository
archival process, some packages are expected to be deleted from the main
opam-repository and moved into the archive repository.
  • Loading branch information
punchagan committed Dec 17, 2024
1 parent beef79d commit fabac09
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/analyse.t
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ Test adding new packages
]
}

Reset commits on [master] and [new-branch-2] and clear build cache

$ git reset -q --hard initial-state
$ git checkout -q master
$ git reset -q --hard initial-state
$ git checkout -q new-branch-2
$ rm -rf var

Test deleting existing packages works

$ git rm packages/a-1/a-1.0.0.1/opam > /dev/null
$ git commit -qm "a-1.0.0.1 removed"
$ git log --graph --pretty=format:'%s%d'
* a-1.0.0.1 removed (HEAD -> new-branch-2)
* a-1 (tag: initial-state, new-branch-1, master)
$ opam-repo-ci-local --repo="." --branch=new-branch-2 --analyse-only --no-web-server
Error "impossible"

Clean up the build cache

$ rm -rf ./var
Expand Down

0 comments on commit fabac09

Please sign in to comment.