Skip to content

Commit

Permalink
ci: add e2e tests for git extension and directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Mar 17, 2024
1 parent ef09865 commit ff10090
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .fluentci/src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions fixtures/directory.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
query Directory {
directory(path: ".") {
id
withExec(args: ["pwd"]) {
stdout
}
entries
}
}
12 changes: 12 additions & 0 deletions fixtures/git.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query Git {
git(url: "https://github.com/tsirysndr/me") {
branch(name: "main") {
tree {
withExec(args: ["pwd"]) {
stdout
}
entries
}
}
}
}

0 comments on commit ff10090

Please sign in to comment.