-
Notifications
You must be signed in to change notification settings - Fork 127
Fix integer constraint #621
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
Conversation
|
Adding the Not exactly sure why the test is failing. |
running the github action. Also bring workflow actions and postgres image up to date.
Update github workflow
|
On postgres: I do see the check constraints in the table schemas, with the correct limits, so the constraint creation seems to work. Unit tests pass locally, without tox, with the usual unexpected connection drop in the last test (still need to figure that one out). So it works no worse than before. :) I just tried the sqlite backend for the first time, and the query side failed. It was still trying to qualify table names with schema names. It's not too surprising it didn't work since I don't think the other backends existed when I was writing it. So that will need more work. It probably won't work with Mariadb either. I don't have permission to merge anything though. Edit: Oh, stix2/datastore/relational_db and stix2/datastore/relational_db/database_backends still ought to have |
rather than subclasses.
the relational data store unit test suite to enable testing of both postgres and sqlite.
Change relational-data-sink class scanning to scan the registry
Querying, unit testing with SQLite
datastore unit tests, to ensure the DB always gets cleared out in between tests, even if a test fails with an exception.
Improve unit test cleanup in relational datastore unit test suite
…n/cti-python-stix2 into fix-integer-constraint
|
all tests work in sqlite except test_multipart_email_msg... |
relational datastore test suite. Fixes a bug where proper unit test cleanup only happened if an exception occurred.
|
Yep, all sqlite tests pass except that one. Only one more to go! I tried running all sqlite and postgresql tests together, and encountered new errors. I tracked it down to a simple contextmanager cleanup error I made. I fixed it in PR #630 . With that fix, I was able to get a complete run of all relational datastore unit tests so far, to work, except for that one sqlite test with the email message. Next, getting mariadb to work! :) |
Fix unit test cleanup bug in relational datastore test suite
|
Maybe should continue the discussion here instead of a closed PR:
When running just the rdb tests, I get: So it is just the email test for me. When running all unit tests, I get a lot more errors, including a lot with the relational datastore unit tests. That suggests bad interactions with other unit tests. So the obvious thing to try is to fix other unit tests to see if the relational datastore unit test errors will go away. Were you thinking we should try to fix the other unit tests (or whatever they're testing) too? |
Fix test_datastore_add_raises unit tests
Fix test_environment_no_datastore() unit tests
contextmanagers to cleanup registrations after each test.
- http-request-ext.request_header is supposed to map string to list of string - error message for DictionaryProperty clean error changed since we changed the clean implementation
Fix unit tests in v21/test_custom.py to cleanup after themselves
Fix some v21/test_observed_data.py unit test breakage
fix email message test
Can you review this and merge it?
I wasn't creating the integer min/max constraint in the db table