-
Notifications
You must be signed in to change notification settings - Fork 3
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
test(flask): backend flask server tests #56
Conversation
note: the |
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.
Very neat! Tho, to add to #55 (comment), consider there are different test suites (i.e NextJS, unittest, database tests, operator tests, helm tests), I propose:
- All tests are placed close to their source, following the language, framework conventions.
- All test files can be created as symlinks in
/tests
. These are non-functional, just for visibility. - Add a
run-test.sh
script or Makefile in/tests
that will run the test suites bycd
to their corresponding folder.- This allows us to run deps installation (i.e. requirements, npm packages. go mod).
The TA/prof can just go run that script. Wdu think?
Ahh looks it this is the issue: https://git-scm.com/docs/gitignore#_pattern_format |
Try this: diff --git a/.gitignore b/.gitignore
index cacb216..a0f8f45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
-# we need this guy
-!**/resources/*.mp4
# don't commit test and temp video/image files
*.mp4
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..d3bb9ab
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1 @@
+!resources/*.mp4 This creates an inner |
@MyStackOverflows are video processor tests requiring AWS credentials? |
Strictly no, as we don't test any AWS functionality (mainly because it's difficult to strictly test an AI's output for good/bad without human intervention). However, I believe the video processor makes a request to get a client when it is first initialized which now that you're mentioning it is probably something that should be changed, the tests should probably be run statically without an instantiated object |
Alright, was just asking because CI in #58 is failing but I set some mocked env vars. |
so should I change the tests to not instantiate the class? None of the actual test code requires AWS credentials but it's still making that request to AWS services when it's instantiated which could potentially throw errors or cause issues down the line |
As in #58, seems like it does not actual check if the credentials are valid as tests passed with fake credentials. Those are checked on-demand, I believe. So you should be okay with current implementations. |
ci(vidserver-test): run video processing server in CI
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.
Looks good! Just a comment above. Tho, i would prefer to have all path covered in tests. However, let's wait till we have a test coverage file to see what we miss in tests.
Paul, can u help research into python test coverage?
not right this minute but definitely in the next week or so xD |
Yes please! Appreciate that! |
Any other comments or planned changes for this PR? |
don't think so, just waiting for Linh but not sure if she's seen this PR |
Alright. I would like to this merged to get the tests in CI. If any other concerns arise, please open a new issue to track. |
initial flask server tests, will add more as more functionality is added to the server and/or functionality is changed but these should cover it for now
signed off: Paul Unger piunger@hotmail.com