citizenos / ep_image_upload

Add images to etherpad and upload them to Amazon S3
Other
9 stars 16 forks source link

Fix backend tests to resolve the error `Error: Unable to create new Pad` #69

Open yacchin1205 opened 1 month ago

yacchin1205 commented 1 month ago

The backend tests of etherpad-lite was reporting the error below:

  11) /home/runner/work/etherpad-lite/etherpad-lite/node_modules/.pnpm/ep_image_upload@1.0.105_ep_etherpad-lite@src/node_modules/ep_image_upload/static/tests/backend/specs/exportHTML.js
       "before each" hook for "returns HTML with img HTML tags":
     Error: Unable to create new Pad
      at createPad (/home/runner/work/etherpad-lite/etherpad-lite/node_modules/.pnpm/ep_image_upload@1.0.105_ep_etherpad-lite@src/node_modules/ep_image_upload/static/tests/backend/specs/exportHTML.js:12:34)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Context.<anonymous> (/home/runner/work/etherpad-lite/etherpad-lite/node_modules/.pnpm/ep_image_upload@1.0.105_ep_etherpad-lite@src/node_modules/ep_image_upload/static/tests/backend/specs/exportHTML.js:29:5)

The reason may be that the backend test is not compliant with the latest etherpad-lite test method. For example, the latest test for ep_font_size seems to give the token obtained from the utility function to the Authorization header. So, I fixed the test by referring to the other test.

SamTV12345 commented 1 month ago

I don't have access to this repo unfortunately and don't know if the maintainer is still around. Otherwise we could fork the repo and move it to ether.

webzwo0i commented 1 month ago

@tiblu Do you think it's okay to friendly fork ep_image_upload on our public ether account? It is one of the most used plugins :-)

tiblu commented 1 month ago

@webzwo0i

@tiblu Do you think it's okay to friendly fork ep_image_upload on our public ether account? It is one of the most used plugins :-)

I am no longer part of CitizenOS team, that said I don't see an issue with that. BUT @ilmartyrk is the right person to make a final decision on that.