Fix rebase

This commit is contained in:
Arnaud 2025-05-30 15:31:09 +02:00
parent 2cb0c9fadc
commit 9a68dd5528
No known key found for this signature in database
GPG Key ID: B8FBC178F10CA7AE
2 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
import { assert, describe, it } from "vitest";
import { CodexData } from "./data";
import { NodeUploadStategy } from "./node-upload";
import { NodeUploadStrategy } from "./node-upload";
import crypto from "crypto";
describe("data", () => {
@ -14,7 +14,7 @@ describe("data", () => {
it("uploads a file a download it locally", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = data.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);
@ -41,7 +41,7 @@ describe("data", () => {
it("saves the metadata uploads provided during the upload", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content, {
const strategy = new NodeUploadStrategy(content, {
filename: "hello.txt",
mimetype: "text/plain",
});
@ -63,7 +63,7 @@ describe("data", () => {
it("fails when providing wrong metadata", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content, {
const strategy = new NodeUploadStrategy(content, {
filename: "hello.txt",
mimetype: "plain/text",
});
@ -79,7 +79,7 @@ describe("data", () => {
it("delete a file a locally", async () => {
const content = "b".repeat(131072);
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = data.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);
@ -99,7 +99,7 @@ describe("data", () => {
it("doesn't do anything when trying to delete a non existing cid", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = spData.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);
@ -124,7 +124,7 @@ describe("data", () => {
const usedBytes = space.data.quotaUsedBytes;
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = data.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);
@ -139,7 +139,7 @@ describe("data", () => {
it("stream downloads a file on the network", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = spData.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);
@ -153,7 +153,7 @@ describe("data", () => {
it("downloads a file on the network", async () => {
const content = crypto.randomBytes(16).toString("hex");
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = spData.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);

View File

@ -1,7 +1,7 @@
import { assert, describe, it } from "vitest";
import { CodexMarketplace } from "./marketplace";
import { CodexData } from "../data/data";
import { NodeUploadStategy } from "../data/node-upload";
import { NodeUploadStrategy } from "../data/node-upload";
import type {
CodexAvailabilityPatchInput,
CodexCreateAvailabilityInput,
@ -154,7 +154,7 @@ describe("marketplace", async () => {
async function uploadContent(sizeInBytes: number) {
const content = "a".repeat(sizeInBytes);
const strategy = new NodeUploadStategy(content);
const strategy = new NodeUploadStrategy(content);
const res = data.upload(strategy);
const cid = await res.result;
assert.ok(cid.error == false);