@@ -60,32 +60,32 @@ class RepoCacheAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
60
60
assertIO(obtained, expected)
61
61
}
62
62
63
- test(" throwIfAbandoned : no maxAge" ) {
63
+ test(" throwIfInactive : no maxAge" ) {
64
64
val repo = Repo (" repo-cache-alg" , " test-1" )
65
65
val cache = RepoCache (dummySha1, Timestamp (0L ), Nil , None , None )
66
66
val config = RepoConfig .empty
67
67
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
69
69
assertIO(obtained, Right (()))
70
70
}
71
71
72
- test(" throwIfAbandoned : lastCommit < maxAge" ) {
72
+ test(" throwIfInactive : lastCommit < maxAge" ) {
73
73
val repo = Repo (" repo-cache-alg" , " test-2" )
74
74
val commitDate = Timestamp .fromLocalDateTime(LocalDateTime .now())
75
75
val cache = RepoCache (dummySha1, commitDate, Nil , None , None )
76
76
val config = RepoConfig (lastCommitMaxAge = Some (1 .day))
77
77
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
79
79
assertIO(obtained, Right (()))
80
80
}
81
81
82
- test(" throwIfAbandoned : lastCommit > maxAge" ) {
82
+ test(" throwIfInactive : lastCommit > maxAge" ) {
83
83
val repo = Repo (" repo-cache-alg" , " test-3" )
84
84
val cache = RepoCache (dummySha1, Timestamp (0L ), Nil , None , None )
85
85
val config = RepoConfig (lastCommitMaxAge = Some (1 .day))
86
86
val data = RepoData (repo, cache, config)
87
87
val obtained =
88
- repoCacheAlg.throwIfAbandoned (data).runA(MockState .empty).attempt.map(_.leftMap(_.getMessage))
88
+ repoCacheAlg.throwIfInactive (data).runA(MockState .empty).attempt.map(_.leftMap(_.getMessage))
89
89
assertIO(obtained, Left (" Skipping because last commit is older than 1d" ))
90
90
}
91
91
}
0 commit comments