Compare commits

...

78 Commits

Author SHA1 Message Date
Suguivy e2c02cb32c Merge pull request 'Added fake data for test and dev environment' (#17) from testing into develop
Reviewed-on: #17
2024-01-06 12:34:44 +00:00
Sugui 1e18234437 Added fake data for testing and dev environment
Unit Tests with docker compose / unit-test (pull_request) Successful in 6m53s Details
2024-01-06 13:25:24 +01:00
Sugui 87f4719fd1 Merge remote-tracking branch 'origin/develop' into testing 2024-01-06 13:20:24 +01:00
Sugui cda0b24851 Restored initial working workflow
Unit Tests with docker compose / unit-test (pull_request) Successful in 3m44s Details
2024-01-01 16:34:17 +01:00
Sugui 6cd2b09c13 Changing things to see if service works
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m52s Details
2024-01-01 16:18:14 +01:00
Sugui 57a79c1e37 Addind docker:dind service
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m44s Details
2024-01-01 16:12:24 +01:00
Sugui e5c5ef51d5 Removing cmd
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m42s Details
2024-01-01 16:04:19 +01:00
Sugui dd9999de91 Adding & to the cmd command
Unit Tests with docker compose / unit-test (pull_request) Waiting to run Details
2024-01-01 16:01:44 +01:00
Sugui 810fd2aed1 Testing docker-init in container's cmd parameter
Unit Tests with docker compose / unit-test (pull_request) Waiting to run Details
2024-01-01 15:59:36 +01:00
Sugui b6d966dc2e Revert "cmd"
This reverts commit e75bb6d8d9.
2023-12-31 13:16:41 +01:00
Sugui e75bb6d8d9 cmd
Unit Tests with docker compose / unit-test (pull_request) Waiting to run Details
2023-12-31 13:10:24 +01:00
Alie 98f9c5bf8e deleted a console log
Unit Tests with docker compose / unit-test (pull_request) Successful in 3m59s Details
2023-12-31 12:01:21 +01:00
Sugui 199f06db43 Now install packages without using a container, and fixed the ping thing
Unit Tests with docker compose / unit-test (pull_request) Successful in 4m20s Details
2023-12-31 11:54:46 +01:00
Sugui 5941fcc1f2 added node again
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m39s Details
2023-12-31 11:44:25 +01:00
Sugui ec1b693538 Removed mongodb-memory-server
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-31 11:42:19 +01:00
Sugui e1ced40c06 monothread and verbose on bun install
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-31 11:36:38 +01:00
Sugui 7fc78c0a03 Added bun again to install dependencies in action
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-31 11:31:46 +01:00
Sugui d368c6bed0 change to mongo:bionic to support the runner on pi 2023-12-31 11:31:28 +01:00
Sugui 640514af6d ping
Unit Tests with docker compose / unit-test (pull_request) Failing after 6m56s Details
2023-12-29 22:01:23 +01:00
Sugui 6bb187305a undid last commit
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m34s Details
2023-12-29 20:22:27 +01:00
Sugui cabe730ab8 Testing adding MONGO_URL as env var
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m19s Details
2023-12-29 20:10:36 +01:00
Sugui 6561c710ff Deleted DEDICATED_MONGO_SERVER env variable
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m41s Details
2023-12-29 19:54:56 +01:00
Alie 76d5764616 added test coverage to image controler
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m32s Details
2023-12-29 19:47:35 +01:00
Alie 9cd61c101c fmt, purged useless deps and removed mongoMS
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m21s Details
2023-12-29 19:37:35 +01:00
Sugui 49b159f9dc node 20
Unit Tests with docker compose / unit-test (pull_request) Failing after 7m17s Details
2023-12-29 19:28:38 +01:00
Sugui 8b27e2577f npm
Unit Tests with docker compose / unit-test (pull_request) Failing after 15s Details
2023-12-29 19:25:48 +01:00
Sugui 2081c2fea8 testing with npm, also moved types to dev
Unit Tests with docker compose / unit-test (pull_request) Failing after 27s Details
2023-12-29 19:24:43 +01:00
Sugui 5d2c9cd325 fixinggg
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-29 19:18:46 +01:00
Sugui a59f288d22 verbose
Unit Tests with docker compose / unit-test (pull_request) Failing after 2m1s Details
2023-12-29 19:14:57 +01:00
Sugui 6e546cc753 yay
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-29 19:07:26 +01:00
Sugui 1bcf3d4590 oven
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m2s Details
2023-12-29 19:03:48 +01:00
Sugui 0dba3d2f6f over bun
Unit Tests with docker compose / unit-test (pull_request) Failing after 38s Details
2023-12-29 19:02:42 +01:00
Sugui ac98daa71e bash
Unit Tests with docker compose / unit-test (pull_request) Failing after 37s Details
2023-12-29 18:48:40 +01:00
Sugui 15f3af264b bun bin bun
Unit Tests with docker compose / unit-test (pull_request) Failing after 37s Details
2023-12-29 18:39:43 +01:00
Sugui 006ea44a6a buni
Unit Tests with docker compose / unit-test (pull_request) Failing after 34s Details
2023-12-29 18:38:25 +01:00
Sugui 18f456c83e docker
Unit Tests with docker compose / unit-test (pull_request) Failing after 2m32s Details
2023-12-29 18:35:08 +01:00
Sugui d62ed9ca18 &
Unit Tests with docker compose / unit-test (pull_request) Failing after 39s Details
2023-12-29 18:34:15 +01:00
Sugui b76865dadf docker init
Unit Tests with docker compose / unit-test (pull_request) Has been cancelled Details
2023-12-29 18:33:20 +01:00
Sugui 108e1793bf ps
Unit Tests with docker compose / unit-test (pull_request) Failing after 36s Details
2023-12-29 18:26:02 +01:00
Sugui 1c204590df dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 33s Details
2023-12-29 18:19:00 +01:00
Sugui e5122f59e4 dind dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 34s Details
2023-12-29 18:15:02 +01:00
Sugui 511eaba538 docker
Unit Tests with docker compose / unit-test (pull_request) Failing after 32s Details
2023-12-29 18:13:25 +01:00
Sugui 3526729166 probamos
Unit Tests with docker compose / unit-test (pull_request) Failing after 38s Details
2023-12-29 18:07:55 +01:00
Sugui 6efb03efbf dind-compose
Unit Tests with docker compose / unit-test (pull_request) Failing after 39s Details
2023-12-29 17:59:11 +01:00
Sugui 0b30819076 dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m26s Details
2023-12-29 17:55:36 +01:00
Sugui 471c84b18c Deleted not docker workflow
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m37s Details
2023-12-29 17:53:29 +01:00
Sugui c801bc448d Docker instead of dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 49s Details
Unit Tests / unit-test (pull_request) Failing after 1m46s Details
2023-12-29 17:31:49 +01:00
Sugui 04bf90cee6 echo
Unit Tests with docker compose / unit-test (pull_request) Failing after 52s Details
Unit Tests / unit-test (pull_request) Failing after 1m49s Details
2023-12-29 17:29:01 +01:00
Sugui a71640dd9f rootless
Unit Tests with docker compose / unit-test (pull_request) Failing after 28s Details
Unit Tests / unit-test (pull_request) Failing after 2m11s Details
2023-12-29 17:23:02 +01:00
Sugui cf1e93afd1 Merge branch 'testing' of ssh://git.fai.st:2600/fedi-image-bot/bot-api into testing
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m2s Details
Unit Tests / unit-test (pull_request) Failing after 2m9s Details
2023-12-29 17:21:47 +01:00
Sugui 5b2196fbd9 being root 2023-12-29 17:21:44 +01:00
Alie c27ce7273a enable debug
Unit Tests with docker compose / unit-test (pull_request) Failing after 35s Details
Unit Tests / unit-test (pull_request) Failing after 2m18s Details
2023-12-29 17:20:35 +01:00
Sugui 071994a17c Merge branch 'testing' of ssh://git.fai.st:2600/fedi-image-bot/bot-api into testing
Unit Tests with docker compose / unit-test (pull_request) Failing after 47s Details
Unit Tests / unit-test (pull_request) Failing after 1m36s Details
2023-12-29 17:12:06 +01:00
Sugui aca87e205b privileged 2023-12-29 17:12:04 +01:00
Alie 8ed2261b90 Merge remote-tracking branch 'refs/remotes/origin/testing' into testing
Unit Tests with docker compose / unit-test (pull_request) Failing after 36s Details
Unit Tests / unit-test (pull_request) Failing after 1m38s Details
2023-12-29 17:11:02 +01:00
Alie 6850989f06 unified the tests in one file for port binding reasons 2023-12-29 17:10:48 +01:00
Sugui 42111a9e30 fixed dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 57s Details
Unit Tests / unit-test (pull_request) Failing after 1m43s Details
2023-12-29 17:08:06 +01:00
Sugui 7230a08cc9 dind
Unit Tests with docker compose / unit-test (pull_request) Failing after 4s Details
Unit Tests / unit-test (pull_request) Failing after 2m26s Details
2023-12-29 17:06:49 +01:00
Sugui a4f4ebbbd2 typo
Unit Tests with docker compose / unit-test (pull_request) Failing after 54s Details
Unit Tests / unit-test (pull_request) Failing after 1m57s Details
2023-12-29 17:05:17 +01:00
Sugui a09119ea45 changed moby to docker
Unit Tests with docker compose / unit-test (pull_request) Failing after 36s Details
Unit Tests / unit-test (pull_request) Failing after 1m55s Details
2023-12-29 17:04:19 +01:00
Sugui 3c723a8109 adding curl and bash
Unit Tests with docker compose / unit-test (pull_request) Failing after 45s Details
Unit Tests / unit-test (pull_request) Failing after 1m47s Details
2023-12-29 17:02:28 +01:00
Sugui 36e91e89f6 adding git
Unit Tests with docker compose / unit-test (pull_request) Failing after 25s Details
Unit Tests / unit-test (pull_request) Failing after 1m26s Details
2023-12-29 17:00:09 +01:00
Sugui 54a4025672 adding nodejs
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m43s Details
Unit Tests / unit-test (pull_request) Failing after 2m12s Details
2023-12-29 16:58:34 +01:00
Sugui 01318e7579 using docker image
Unit Tests with docker compose / unit-test (pull_request) Failing after 48s Details
Unit Tests / unit-test (pull_request) Failing after 1m46s Details
2023-12-29 16:53:56 +01:00
Sugui 4dd4d18a92 testing moby
Unit Tests with docker compose / unit-test (pull_request) Failing after 34s Details
Unit Tests / unit-test (pull_request) Failing after 1m39s Details
2023-12-29 16:48:26 +01:00
Sugui 2684b2e1d5 update
Unit Tests / unit-test (pull_request) Failing after 1m43s Details
Unit Tests with docker compose / unit-test (pull_request) Failing after 3m55s Details
2023-12-29 16:39:54 +01:00
Sugui e64474a4f4 Testing action with docker compose
Unit Tests with docker compose / unit-test (pull_request) Failing after 1m10s Details
Unit Tests / unit-test (pull_request) Failing after 3m59s Details
2023-12-29 16:37:24 +01:00
Alie 86f20e6b45 there is no mongo dor debian11 aarch64 :)
Unit Tests / unit-test (pull_request) Failing after 3m32s Details
2023-12-29 16:25:42 +01:00
Alie c8fa9cc2dd ok, then directly execute
Unit Tests / unit-test (pull_request) Failing after 1m17s Details
2023-12-29 16:22:03 +01:00
Alie 1da18fba4e why does it not let you source???
Unit Tests / unit-test (pull_request) Failing after 22s Details
2023-12-29 16:20:18 +01:00
Alie 1aa75a21fd path
Unit Tests / unit-test (pull_request) Failing after 23s Details
2023-12-29 16:18:53 +01:00
Alie 90b617f86c bash
Unit Tests / unit-test (pull_request) Failing after 28s Details
2023-12-29 16:17:50 +01:00
Alie d9814a28eb container
Unit Tests / unit-test (pull_request) Failing after 31s Details
2023-12-29 16:16:57 +01:00
Alie e5d191dd58 forgor to pipe
Unit Tests / unit-test (pull_request) Failing after 1m44s Details
2023-12-29 16:15:42 +01:00
Alie 1c05d114a4 changed the image
Unit Tests / unit-test (pull_request) Failing after 2m5s Details
2023-12-29 16:11:49 +01:00
Alie 6acb9ee3d9 changes to the action
Unit Tests / unit-test (pull_request) Failing after 56s Details
2023-12-29 16:08:09 +01:00
Alie 7c68174ca4 fixed the test issue, before all and things 2023-12-29 16:05:51 +01:00
Sugui 1b45481d27 commit all changes to tests 2023-12-29 15:24:29 +01:00
2 changed files with 15 additions and 6 deletions

View File

@ -3,6 +3,7 @@
"module": "index.ts",
"type": "module",
"devDependencies": {
"@faker-js/faker": "^8.3.1",
"@types/express": "^4.17.21",
"@types/express-list-endpoints": "^6.0.3",
"@types/jest": "^29.5.11",

View File

@ -1,12 +1,20 @@
import authModel from "../src/models/AuthModel";
import imageModel from "../src/models/ImageModel";
import imageModel, { Image } from "../src/models/ImageModel";
import { faker } from '@faker-js/faker';
export default async function () {
await imageModel.create({
url: "https://example.com",
status: "consumed",
tags: ["2girls", "sleeping"],
});
const images = faker.helpers.multiple(() => ({
url: faker.helpers.unique(faker.internet.url),
status: faker.helpers.arrayElement(["available", "unavailable", "consumed"]),
tags: faker.helpers.arrayElements([
"2girls", "sleeping", "touhou",
"pokemon", "closed_eyes", "yume_nikki",
"waifu", "computer", "party", "yuru_camp"
], { min: 0, max: 5 }),
}), {count: {min: 5, max:50}});
// Wait until all images are inserted
await Promise.allSettled(images.map(image => imageModel.create(image)));
await authModel.create({
app: "tester",