From ff100902565ae5695a67f69afadcd1e65207e477 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Sun, 17 Mar 2024 16:37:53 +0000 Subject: [PATCH] ci: add e2e tests for git extension and directory --- .fluentci/src/dagger/jobs.ts | 16 ++++++++++++++++ fixtures/directory.graphql | 9 +++++++++ fixtures/git.graphql | 12 ++++++++++++ 3 files changed, 37 insertions(+) diff --git a/.fluentci/src/dagger/jobs.ts b/.fluentci/src/dagger/jobs.ts index 1a6ab7c..de1e202 100644 --- a/.fluentci/src/dagger/jobs.ts +++ b/.fluentci/src/dagger/jobs.ts @@ -249,6 +249,22 @@ export async function e2e( .withServiceBinding("fluentci-engine", engine) .sync(); + const git = ctr.withExec([ + "bash", + "-c", + `http POST http://fluentci-engine:6880/graphql Content-Type:application/json query="$(cat git.graphql)" --ignore-stdin --pretty format`, + ]); + + console.log(await git.stdout()); + + const directory = ctr.withExec([ + "bash", + "-c", + `http POST http://fluentci-engine:6880/graphql Content-Type:application/json query="$(cat directory.graphql)" --ignore-stdin --pretty format`, + ]); + + console.log(await directory.stdout()); + const pkgx = ctr.withExec([ "bash", "-c", diff --git a/fixtures/directory.graphql b/fixtures/directory.graphql index e69de29..3b2d1eb 100644 --- a/fixtures/directory.graphql +++ b/fixtures/directory.graphql @@ -0,0 +1,9 @@ +query Directory { + directory(path: ".") { + id + withExec(args: ["pwd"]) { + stdout + } + entries + } +} diff --git a/fixtures/git.graphql b/fixtures/git.graphql index e69de29..5ebd0c2 100644 --- a/fixtures/git.graphql +++ b/fixtures/git.graphql @@ -0,0 +1,12 @@ +query Git { + git(url: "https://github.com/tsirysndr/me") { + branch(name: "main") { + tree { + withExec(args: ["pwd"]) { + stdout + } + entries + } + } + } +}