Replace planning-era names and squash initial schema
Use descriptive test and executable names so implementation surfaces do not depend on journal organization. Consolidate the unreleased migration history into the authoritative initial schema because no deployed database requires an upgrade path.
This commit is contained in:
parent
0053860c95
commit
15eb0038d2
1 changed files with 299 additions and 436 deletions
|
|
@ -63,7 +63,7 @@ verifyConfiguration = do
|
|||
expectRejected
|
||||
(load
|
||||
[ ( "NUTHATCH_PUBLIC_BASE_URL"
|
||||
, Just "https://user:password@wp12.invalid"
|
||||
, Just "https://user:password@runtime.invalid"
|
||||
)
|
||||
])
|
||||
"credential-bearing URI configuration"
|
||||
|
|
@ -91,10 +91,10 @@ setVariable name = maybe (unsetEnv name) (setEnv name)
|
|||
|
||||
verifyAvailable :: Config -> Redis -> IO ()
|
||||
verifyAvailable config redis = do
|
||||
cacheSet redis "nuthatch:wp12:ttl" (cfgListCacheTtlSec config) "cached"
|
||||
cacheGet redis "nuthatch:wp12:ttl" >>= requireEqual (Just "cached")
|
||||
cacheSet redis "nuthatch:runtime:ttl" (cfgListCacheTtlSec config) "cached"
|
||||
cacheGet redis "nuthatch:runtime:ttl" >>= requireEqual (Just "cached")
|
||||
threadDelay (fromInteger ((cfgListCacheTtlSec config + 1) * 1000000))
|
||||
cacheGet redis "nuthatch:wp12:ttl" >>= requireEqual Nothing
|
||||
cacheGet redis "nuthatch:runtime:ttl" >>= requireEqual Nothing
|
||||
let userA = UserId "runtime-user-a"
|
||||
userB = UserId "runtime-user-b"
|
||||
sharedBeforeA <- cacheGeneration redis userA Shared
|
||||
|
|
@ -112,8 +112,8 @@ verifyAvailable config redis = do
|
|||
|
||||
verifyUnavailable :: Config -> Redis -> IO ()
|
||||
verifyUnavailable config redis = do
|
||||
cacheGet redis "nuthatch:wp12:missing" >>= requireEqual Nothing
|
||||
cacheSet redis "nuthatch:wp12:missing" 1 "ignored"
|
||||
cacheGet redis "nuthatch:runtime:missing" >>= requireEqual Nothing
|
||||
cacheSet redis "nuthatch:runtime:missing" 1 "ignored"
|
||||
cacheInvalidatePrefixes redis (UserId "runtime-user") Shared [""]
|
||||
throttled <- throttleCheck redis config (UserId "runtime-user") 1
|
||||
case throttled of
|
||||
|
|
|
|||
Loading…
Reference in a new issue