fix test suite
The test suite found a bug; select_ can fail now because a uniqueness constrain has been added. Now the test suite passes. Also, I'm satisfied the changed PersistField instances work. Looking over what changed, and what I've already tested, Key, FilePath, and InodeCache are known working; ContentIdentifier is trivial ByteString to blob; and SSha is trivial String to varchar. Both are tested by the test suite. I've also tested the new FileSize and EpochTime instances already, and they work.
This commit is contained in:
parent
d7ecac66d2
commit
d3e4de0175
3 changed files with 4 additions and 6 deletions
|
@ -94,7 +94,7 @@ flushDbQueue (ContentIdentifierHandle h) = H.flushDbQueue h
|
|||
-- Be sure to also update the git-annex branch when using this.
|
||||
recordContentIdentifier :: ContentIdentifierHandle -> RemoteStateHandle -> ContentIdentifier -> Key -> IO ()
|
||||
recordContentIdentifier h (RemoteStateHandle u) cid k = queueDb h $ do
|
||||
void $ insert_ $ ContentIdentifiers u cid k
|
||||
void $ insertUnique $ ContentIdentifiers u cid k
|
||||
|
||||
getContentIdentifiers :: ContentIdentifierHandle -> RemoteStateHandle -> Key -> IO [ContentIdentifier]
|
||||
getContentIdentifiers (ContentIdentifierHandle h) (RemoteStateHandle u) k =
|
||||
|
|
6
Test.hs
6
Test.hs
|
@ -148,9 +148,9 @@ tests crippledfilesystem adjustedbranchok opts =
|
|||
map (\(d, te) -> withTestMode te initTests (unitTests d)) testmodes
|
||||
where
|
||||
testmodes = catMaybes
|
||||
[ canadjust ("v7 adjusted unlocked branch", (testMode opts (RepoVersion 7)) { adjustedUnlockedBranch = True })
|
||||
, unlesscrippled ("v7 unlocked", (testMode opts (RepoVersion 7)) { unlockedFiles = True })
|
||||
, unlesscrippled ("v7 locked", testMode opts (RepoVersion 7))
|
||||
[ canadjust ("v8 adjusted unlocked branch", (testMode opts (RepoVersion 8)) { adjustedUnlockedBranch = True })
|
||||
, unlesscrippled ("v8 unlocked", (testMode opts (RepoVersion 8)) { unlockedFiles = True })
|
||||
, unlesscrippled ("v8 locked", testMode opts (RepoVersion 8))
|
||||
]
|
||||
unlesscrippled v
|
||||
| crippledfilesystem = Nothing
|
||||
|
|
|
@ -65,8 +65,6 @@ process.
|
|||
|
||||
remaining todo:
|
||||
|
||||
* test all changed types in Database.Types serialize and deserialize
|
||||
correctly
|
||||
* migration
|
||||
|
||||
> Investigated this in more detail, and I can't find a way to
|
||||
|
|
Loading…
Add table
Reference in a new issue