@@ -60,32 +60,32 @@ class RepoCacheAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
6060 assertIO(obtained, expected)
6161 }
6262
63- test(" throwIfAbandoned : no maxAge" ) {
63+ test(" throwIfInactive : no maxAge" ) {
6464 val repo = Repo (" repo-cache-alg" , " test-1" )
6565 val cache = RepoCache (dummySha1, Timestamp (0L ), Nil , None , None )
6666 val config = RepoConfig .empty
6767 val data = RepoData (repo, cache, config)
68- val obtained = repoCacheAlg.throwIfAbandoned (data).runA(MockState .empty).attempt
68+ val obtained = repoCacheAlg.throwIfInactive (data).runA(MockState .empty).attempt
6969 assertIO(obtained, Right (()))
7070 }
7171
72- test(" throwIfAbandoned : lastCommit < maxAge" ) {
72+ test(" throwIfInactive : lastCommit < maxAge" ) {
7373 val repo = Repo (" repo-cache-alg" , " test-2" )
7474 val commitDate = Timestamp .fromLocalDateTime(LocalDateTime .now())
7575 val cache = RepoCache (dummySha1, commitDate, Nil , None , None )
7676 val config = RepoConfig (lastCommitMaxAge = Some (1 .day))
7777 val data = RepoData (repo, cache, config)
78- val obtained = repoCacheAlg.throwIfAbandoned (data).runA(MockState .empty).attempt
78+ val obtained = repoCacheAlg.throwIfInactive (data).runA(MockState .empty).attempt
7979 assertIO(obtained, Right (()))
8080 }
8181
82- test(" throwIfAbandoned : lastCommit > maxAge" ) {
82+ test(" throwIfInactive : lastCommit > maxAge" ) {
8383 val repo = Repo (" repo-cache-alg" , " test-3" )
8484 val cache = RepoCache (dummySha1, Timestamp (0L ), Nil , None , None )
8585 val config = RepoConfig (lastCommitMaxAge = Some (1 .day))
8686 val data = RepoData (repo, cache, config)
8787 val obtained =
88- repoCacheAlg.throwIfAbandoned (data).runA(MockState .empty).attempt.map(_.leftMap(_.getMessage))
88+ repoCacheAlg.throwIfInactive (data).runA(MockState .empty).attempt.map(_.leftMap(_.getMessage))
8989 assertIO(obtained, Left (" Skipping because last commit is older than 1d" ))
9090 }
9191}
0 commit comments