use backend-core minio test container in server
This commit is contained in:
parent
99f2b3e7fd
commit
b3c76f36aa
|
@ -28,7 +28,7 @@ jest.mock("uuid", () => ({ v4: () => "00000000-0000-0000-0000-000000000000" }))
|
||||||
import { default as RestIntegration } from "../rest"
|
import { default as RestIntegration } from "../rest"
|
||||||
import { RestAuthType } from "@budibase/types"
|
import { RestAuthType } from "@budibase/types"
|
||||||
import fetch from "node-fetch"
|
import fetch from "node-fetch"
|
||||||
import { objectStoreTestProviders } from "./utils"
|
import { objectStoreTestProviders } from "@budibase/backend-core/tests"
|
||||||
import { Readable } from "stream"
|
import { Readable } from "stream"
|
||||||
|
|
||||||
const FormData = require("form-data")
|
const FormData = require("form-data")
|
||||||
|
@ -628,6 +628,7 @@ describe("REST Integration", () => {
|
||||||
|
|
||||||
describe("File Handling", () => {
|
describe("File Handling", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
jest.unmock("aws-sdk")
|
||||||
await objectStoreTestProviders.minio.start()
|
await objectStoreTestProviders.minio.start()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -668,7 +669,9 @@ describe("REST Integration", () => {
|
||||||
expect(response.data).toEqual({
|
expect(response.data).toEqual({
|
||||||
size: responseData.byteLength,
|
size: responseData.byteLength,
|
||||||
name: "00000000-0000-0000-0000-000000000000.tar.gz",
|
name: "00000000-0000-0000-0000-000000000000.tar.gz",
|
||||||
url: "/files/signed/tmp-file-attachments/app-id/00000000-0000-0000-0000-000000000000.tar.gz",
|
url: expect.stringContaining(
|
||||||
|
"/files/signed/tmp-file-attachments/app-id/00000000-0000-0000-0000-000000000000.tar.gz"
|
||||||
|
),
|
||||||
extension: "tar.gz",
|
extension: "tar.gz",
|
||||||
key: expect.stringContaining(
|
key: expect.stringContaining(
|
||||||
"app-id/00000000-0000-0000-0000-000000000000.tar.gz"
|
"app-id/00000000-0000-0000-0000-000000000000.tar.gz"
|
||||||
|
@ -710,7 +713,9 @@ describe("REST Integration", () => {
|
||||||
expect(response.data).toEqual({
|
expect(response.data).toEqual({
|
||||||
size: responseData.byteLength,
|
size: responseData.byteLength,
|
||||||
name: "00000000-0000-0000-0000-000000000000.pdf",
|
name: "00000000-0000-0000-0000-000000000000.pdf",
|
||||||
url: "/files/signed/tmp-file-attachments/app-id/00000000-0000-0000-0000-000000000000.pdf",
|
url: expect.stringContaining(
|
||||||
|
"/files/signed/tmp-file-attachments/app-id/00000000-0000-0000-0000-000000000000.pdf"
|
||||||
|
),
|
||||||
extension: "pdf",
|
extension: "pdf",
|
||||||
key: expect.stringContaining(
|
key: expect.stringContaining(
|
||||||
"app-id/00000000-0000-0000-0000-000000000000.pdf"
|
"app-id/00000000-0000-0000-0000-000000000000.pdf"
|
||||||
|
|
Loading…
Reference in New Issue