[sqlite] fix tests for MimeUnrender instance

parent d6c2e293
Pipeline #7334 failed with stages
in 73 minutes and 31 seconds
......@@ -19,7 +19,7 @@ import Gargantext.API.Node.Document.Export.Types qualified as DocumentExport
import Gargantext.Core.Types ( TODO )
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Prelude
import Servant (Accept(..), MimeRender(mimeRender), OctetStream)
import Servant (Accept(..), MimeRender(mimeRender), MimeUnrender(mimeUnrender), OctetStream)
-- Corpus Export
......@@ -40,6 +40,8 @@ $(deriveJSON (unPrefix "_c_") ''Corpus)
-- | Wrapper around 'ByteString' to return an SQLite db containing
-- corpus
newtype CorpusSQLite =
CorpusSQLite { _cs_bs :: BSL.ByteString }
deriving (Generic)
......@@ -47,6 +49,9 @@ instance Accept CorpusSQLite where
contentType _ = contentType (Proxy :: Proxy OctetStream)
instance MimeRender OctetStream CorpusSQLite where
mimeRender _ (CorpusSQLite bs) = bs
-- | Needed for tests
instance MimeUnrender OctetStream CorpusSQLite where
mimeUnrender _ bs = Right $ CorpusSQLite { _cs_bs = bs }
instance ToSchema CorpusSQLite where
declareNamedSchema _ = pure $ NamedSchema (Just "CorpusSQLite") binarySchema
......@@ -31,6 +31,7 @@
- "data-fix-0.3.4"
- "dec-0.0.6"
- "digest-0.0.2.1"
- "direct-sqlite-2.3.29"
- "double-conversion-2.0.5.0"
- "extra-1.7.16"
- "fast-logger-3.2.3"
......@@ -117,6 +118,7 @@
- "singletons-3.0.3"
- "some-1.0.6"
- "split-0.2.5"
- "sqlite-simple-0.4.19.0"
- "stemmer-0.5.2"
- "stm-containers-1.2.1"
- "stm-hamt-1.2.1"
......@@ -357,6 +359,10 @@ flags:
tagged: true
bitvec:
simd: true
"blaze-textual":
developer: false
"integer-simple": false
native: true
boring:
tagged: true
"bytestring-builder":
......@@ -422,6 +428,14 @@ flags:
have_strong_getauxval: false
have_weak_getauxval: false
"pkg-config": true
"direct-sqlite":
dbstat: true
fulltextsearch: true
haveusleep: true
json1: true
mathfunctions: false
systemlib: false
urifilenames: true
distributive:
semigroups: true
tagged: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment