MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / testdrive

Function testdrive

console/src/test/sql/mzcompose.ts:58–90  ·  view source on GitHub ↗
(
  input: string,
  options: {
    noReset?: boolean;
    escapeSpecialCharacters?: boolean;
    timeoutSeconds?: number;
  } = {
    // Template strings automatically escape certain characters by default, but we disable
    // that behavior.
    escapeSpecialCharacters: true,
    timeoutSeconds: 1,
  },
)

Source from the content-addressed store, hash-verified

56 * Executes testdrive with the given test script.
57 */
58export async function testdrive(
59 input: string,
60 options: {
61 noReset?: boolean;
62 escapeSpecialCharacters?: boolean;
63 timeoutSeconds?: number;
64 } = {
65 // Template strings automatically escape certain characters by default, but we disable
66 // that behavior.
67 escapeSpecialCharacters: true,
68 timeoutSeconds: 1,
69 },
70) {
71 return docker(
72 "exec",
73 [
74 "-i",
75 "console-testdrive-1",
76 "testdrive",
77 "--kafka-addr=kafka:9092",
78 "--schema-registry-url=http://schema-registry:8081",
79 "--materialize-url=postgres://materialize@materialized:6875",
80 "--materialize-internal-url=postgres://materialize@materialized:6877",
81 options.noReset ? "--no-reset" : "",
82 options.timeoutSeconds
83 ? `--default-timeout ${options.timeoutSeconds}s`
84 : "",
85 ],
86 options.escapeSpecialCharacters
87 ? dedenterWithEscapeSpecialCharacters(input)
88 : dedenter(input),
89 );
90}
91
92export async function docker(
93 command: string,

Calls 1

dockerFunction · 0.85

Tested by 1

createBasicLagGraphFunction · 0.72