gitignore

This commit is contained in:
@wwwjim 2020-10-06 12:27:27 -07:00
parent e7e2cc9ecf
commit 0b83c71749
2 changed files with 32 additions and 1 deletions

6
.gitignore vendored
View File

@ -12,6 +12,12 @@ yarn.lock
node_modules
dist
200MB_BUCKET_TEST.txt
500MB_BUCKET_TEST.txt
1GB_BUCKET_TEST.txt
2GB_BUCKET_TEST.txt
4GB_BUCKET_TEST.txt
/**/*/package-lock.json
/**/*/.DS_STORE
/**/*/node_modules

View File

@ -6,7 +6,7 @@ import configs from "~/knexfile";
import knex from "knex";
import { PrivateKey } from "@textile/hub";
import { exec } from "child_process";
import { execSync } from "child_process";
const envConfig = configs["development"];
const db = knex(envConfig);
@ -57,6 +57,31 @@ const run = async () => {
});
}
// NOTE(jim): Create 200MB File
// Create 500MB File
// Create 1GB File
// Create 2GB File
// Create 4GB File
try {
await execSync(
"dd if=/dev/random of=200MB_BUCKET_TEST.txt bs=1 count=0 seek=200m"
);
await execSync(
"dd if=/dev/random of=500MB_BUCKET_TEST.txt bs=1 count=0 seek=500m"
);
await execSync(
"dd if=/dev/random of=1GB_BUCKET_TEST.txt bs=1 count=0 seek=1g"
);
await execSync(
"dd if=/dev/random of=2GB_BUCKET_TEST.txt bs=1 count=0 seek=2g"
);
await execSync(
"dd if=/dev/random of=4GB_BUCKET_TEST.txt bs=1 count=0 seek=4g"
);
} catch (e) {
console.log(e.message);
}
// NOTE(jim): Remove the bucket from Textile.
let bucketRemoval;
try {