New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate beta version of sbvr-types supporting WebResource #592
base: master
Are you sure you want to change the base?
Conversation
78cbf2d
to
59ff08a
Compare
@balena-ci re-test |
59ff08a
to
d834697
Compare
@balena-ci re-test |
ece34b0
to
d4411f4
Compare
@nitishagar Can you review this PR? It integrates your changes with sbvr-types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we can easily register / use the multiform and multer only for resources that actually have these properties defined.
Please add test cases in pinejs. Here we have the ability to test pineJs within a docker-compose test setup.
); | ||
} | ||
} else { | ||
maxFileSize = 1024 * 1024 * 1024 * 2; // 2GB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is 2GiB the default maxFileSize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fisehara It looks like a sane default to avoid processing extra big files while allowing somebody to upload an image or "tarball"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - I had reviewed the same day, but review wasn't submitted 😵💫
9f0dd11
to
b03d423
Compare
src/server-glue/module.ts
Outdated
@@ -72,6 +75,10 @@ export const init = async <T extends string>( | |||
} | |||
await Promise.all(promises); | |||
|
|||
if (process.env.PINEJS_STORAGE_ENGINE === 'S3') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the configLoader.Config
instead of env-var? cc. @Page-
498b0d3
to
6b3e0e8
Compare
@@ -73,5 +76,41 @@ describe('01 basic constrain tests', function () { | |||
'It is necessary that each student that has a semester credits, has a semester credits that is greater than or equal to 4 and is less than or equal to 16.', | |||
); | |||
}); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's verbose, but please move this test to a new 0x-webresource.test.ts as it's testing a complete new finctionality.
This test file should contain all kinds of SBVR rules / constraints that can be defined. The WebResource is not a constrain as is but a more complex functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to copy the fixtures in the same way and please move the resources
folder into the test-case named fixtures folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some hints:
- we use supertest for testing the endpoints, which should be usable and axios is not necessary for testing
- Page has luckily build a great package to read, parse and default environment variables, we should start using it by default :)
I'm lacking understanding if all error cases / fail conditions are handled, and just want to trigger to think about failing library functions, initialisations of loaded packages.
ea6507d
to
c4cb038
Compare
@balena-ci re-test |
Update to @balena/open-multer-s3, better large files test Change-type: patch Signed-off-by: Ramiro Gonzalez <ramiro.gonzalez@balena.io>
5ba85b4
to
d47babe
Compare
Change-type: minor
Signed-off-by: Ramiro Gonzalez ramiro.gonzalez@balena.io