graphql-engine/server/tests-hspec/Test/HelloWorldSpec.hs
Antoine Leblanc dc4a286c64 Prepare test suite for remote servers tests
## Description

This PR adds all the scaffolding for tests that require remote servers. It is mostly a refactor of `Feature`; where we listed for each test a list of individual backends, we now provide a list of `Context`s, that allows for tests to specify not only how it should be setup, but also what state needs to be carried around throughout the test. This will be useful when launching custom remote servers.

Additionally, this PR:
- cleans the way we generate logs in the engine as part of the tests
- cleans the cabal file
- introduce a few more helpers for sending commands to the engine (such as `postMetadata_`)
- allows for headers in queries sent to the engine (to support permissions tests)
- adds basic code to start / stop a "remote" server

This PR is a pre-requisite of #3567.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3573
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: 05f808c6b85729dbb3ea6648c3e10a3c16b641ef
2022-02-14 17:25:28 +00:00

20 lines
532 B
Haskell

-- | A starting point feature test.
module Test.HelloWorldSpec (spec) where
import Harness.State (State)
import Harness.Test.Feature qualified as Feature
import Test.Hspec (SpecWith, it, shouldBe)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith State
spec = Feature.run [] tests
--------------------------------------------------------------------------------
-- Tests
tests :: Feature.Options -> SpecWith State
tests _opts = it "No-op" \_ -> do
() `shouldBe` ()