[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 ...@@ -19,7 +19,7 @@ import Gargantext.API.Node.Document.Export.Types qualified as DocumentExport
import Gargantext.Core.Types ( TODO ) import Gargantext.Core.Types ( TODO )
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger) import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Prelude import Gargantext.Prelude
import Servant (Accept(..), MimeRender(mimeRender), OctetStream) import Servant (Accept(..), MimeRender(mimeRender), MimeUnrender(mimeUnrender), OctetStream)
-- Corpus Export -- Corpus Export
...@@ -40,6 +40,8 @@ $(deriveJSON (unPrefix "_c_") ''Corpus) ...@@ -40,6 +40,8 @@ $(deriveJSON (unPrefix "_c_") ''Corpus)
-- | Wrapper around 'ByteString' to return an SQLite db containing
-- corpus
newtype CorpusSQLite = newtype CorpusSQLite =
CorpusSQLite { _cs_bs :: BSL.ByteString } CorpusSQLite { _cs_bs :: BSL.ByteString }
deriving (Generic) deriving (Generic)
...@@ -47,6 +49,9 @@ instance Accept CorpusSQLite where ...@@ -47,6 +49,9 @@ instance Accept CorpusSQLite where
contentType _ = contentType (Proxy :: Proxy OctetStream) contentType _ = contentType (Proxy :: Proxy OctetStream)
instance MimeRender OctetStream CorpusSQLite where instance MimeRender OctetStream CorpusSQLite where
mimeRender _ (CorpusSQLite bs) = bs mimeRender _ (CorpusSQLite bs) = bs
-- | Needed for tests
instance MimeUnrender OctetStream CorpusSQLite where
mimeUnrender _ bs = Right $ CorpusSQLite { _cs_bs = bs }
instance ToSchema CorpusSQLite where instance ToSchema CorpusSQLite where
declareNamedSchema _ = pure $ NamedSchema (Just "CorpusSQLite") binarySchema declareNamedSchema _ = pure $ NamedSchema (Just "CorpusSQLite") binarySchema
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
- "data-fix-0.3.4" - "data-fix-0.3.4"
- "dec-0.0.6" - "dec-0.0.6"
- "digest-0.0.2.1" - "digest-0.0.2.1"
- "direct-sqlite-2.3.29"
- "double-conversion-2.0.5.0" - "double-conversion-2.0.5.0"
- "extra-1.7.16" - "extra-1.7.16"
- "fast-logger-3.2.3" - "fast-logger-3.2.3"
...@@ -117,6 +118,7 @@ ...@@ -117,6 +118,7 @@
- "singletons-3.0.3" - "singletons-3.0.3"
- "some-1.0.6" - "some-1.0.6"
- "split-0.2.5" - "split-0.2.5"
- "sqlite-simple-0.4.19.0"
- "stemmer-0.5.2" - "stemmer-0.5.2"
- "stm-containers-1.2.1" - "stm-containers-1.2.1"
- "stm-hamt-1.2.1" - "stm-hamt-1.2.1"
...@@ -357,6 +359,10 @@ flags: ...@@ -357,6 +359,10 @@ flags:
tagged: true tagged: true
bitvec: bitvec:
simd: true simd: true
"blaze-textual":
developer: false
"integer-simple": false
native: true
boring: boring:
tagged: true tagged: true
"bytestring-builder": "bytestring-builder":
...@@ -422,6 +428,14 @@ flags: ...@@ -422,6 +428,14 @@ flags:
have_strong_getauxval: false have_strong_getauxval: false
have_weak_getauxval: false have_weak_getauxval: false
"pkg-config": true "pkg-config": true
"direct-sqlite":
dbstat: true
fulltextsearch: true
haveusleep: true
json1: true
mathfunctions: false
systemlib: false
urifilenames: true
distributive: distributive:
semigroups: true semigroups: true
tagged: 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