Use api
This commit is contained in:
parent
069b0d6161
commit
47899c669d
|
@ -47,7 +47,7 @@ describe("postgres integrations", () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
async function createAuxTable(prefix: string) {
|
async function createAuxTable(prefix: string) {
|
||||||
return await config.createTable({
|
return await config.api.table.create({
|
||||||
name: `${prefix}_${generator.word({ length: 6 })}`,
|
name: `${prefix}_${generator.word({ length: 6 })}`,
|
||||||
type: "external",
|
type: "external",
|
||||||
primary: ["id"],
|
primary: ["id"],
|
||||||
|
@ -83,7 +83,7 @@ describe("postgres integrations", () => {
|
||||||
relationshipType: RelationshipType.MANY_TO_MANY,
|
relationshipType: RelationshipType.MANY_TO_MANY,
|
||||||
}
|
}
|
||||||
|
|
||||||
primaryPostgresTable = await config.createTable({
|
primaryPostgresTable = await config.api.table.create({
|
||||||
name: `p_${generator.word({ length: 6 })}`,
|
name: `p_${generator.word({ length: 6 })}`,
|
||||||
type: "external",
|
type: "external",
|
||||||
primary: ["id"],
|
primary: ["id"],
|
||||||
|
@ -263,7 +263,7 @@ describe("postgres integrations", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createDefaultPgTable() {
|
async function createDefaultPgTable() {
|
||||||
return await config.createTable({
|
return await config.api.table.create({
|
||||||
name: generator.word({ length: 10 }),
|
name: generator.word({ length: 10 }),
|
||||||
type: "external",
|
type: "external",
|
||||||
primary: ["id"],
|
primary: ["id"],
|
||||||
|
@ -301,7 +301,7 @@ describe("postgres integrations", () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
it("validate table schema", async () => {
|
it.only("validate table schema", async () => {
|
||||||
const res = await makeRequest(
|
const res = await makeRequest(
|
||||||
"get",
|
"get",
|
||||||
`/api/datasources/${postgresDatasource._id}`
|
`/api/datasources/${postgresDatasource._id}`
|
||||||
|
|
Loading…
Reference in New Issue