-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Working in oracle tests #1
Open
gabolera
wants to merge
13
commits into
master
Choose a base branch
from
oracle
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truncate() only deletes lines and not sequences/incrementals, its a problem with tests
the library of `oracledb` returns ids with a string! discussion about this in knex#3134
the test failed is `should replace undefined keys in multi insert with DEFAULT`
drop this table before because error on `test_table_two`. Error is `ORA-02449: unique/primary keys in table referenced by foreign keys`
in official repository from `node-oracledb` has a commit changing this message \n[Commit](oracle/node-oracledb@8206eb6#diff-0af7067b49efcaf7dae9a3707f2e79638b336e72780d2b834e007f80ef9a5fa0R196)
…set auto sequences `.truncate()` in oracle clear data rows but not clear sequences that's why this tests dosen't work with oracle. let's drop table and recreate for restart sequences
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Environment
Knex version: latest
Database + version: Oracle 18
OS: Windows (WSL 2 / Ubuntu 22.04)
Issues Refs:
knex#4890
Initial problem!
On execute workflow on master, the tests of the
oracledb
driver are is disabled. you can view in here!integration-tests.yml
https://github.com/knex/knex/blob/9659a20753e22939ffb547e3b10d5bfa6a3fd941/.github/workflows/integration-tests.yml#L92-L93
And coverage test is disabled too.
coverage.yml
https://github.com/knex/knex/blob/9659a20753e22939ffb547e3b10d5bfa6a3fd941/.github/workflows/coverage.yml#L35-L36
Bugs on executed tests
On execute
npm run test:oracledb
has a total of 43 bugs.References issues finded
This issue is a list of bugs found in the tests of the
oracledb
driver. in here i'm explained all commits executed to solve the problems.1 - Integration Tests > Oracledb driver tests > OracleDb unit tests > disposes the connection on connection error
Bug
In official repository from
node-oracledb
has a commit changing this default message Commit Here2 - Oracledb dialect > Connection configuration > knex#4869 inserting Buffer
Bug
Adjusted to correctly format return oracle 18c
3 - Inserts > should handle simple inserts
Bug
Fixing return id with a string because the oracle return a string when is a insert with returning.
Remove a truncate() method because the oracle clear rows but not clear the sequence, i need drop tables and recreate for pass the sequencial tests.
4 - Inserts > should handle multi inserts
Bug
5 - Inserts > should allow for using the `asCallback` interface
Bug
6 - Inserts > should take hashes passed into insert and keep them in the correct order
Bug
7 - Inserts > should drop any where clause bindings
Bug
8 - Inserts > should handle empty inserts
Bug
9 - Inserts > should handle empty arrays inserts
Bug
10 - Inserts > should allow a * for returning in postgres and oracle
Bug
Tip
TODO: Review this
11 - Inserts > should replace undefined keys in multi insert with DEFAULT
Bug
Function is not working correctly, i'm removing for working correctly
12 - Additional > Custom response processing > should emit error events when a stream query fails
Bug
13 - Additional > Custom response processing > should release the connection when a stream query iteration errors
Bug
14 - Additional > Custom response processing > should process response done through a stream
Bug
15 - Additional > Custom response processing > should pass query context for responses through a stream
Bug
16 - Additional > Custom response processing > should process response for each row done through a stream
Bug
17 - Additional > other operations > should allow using .fn-methods to generate a uuid with select
Bug
18 - Additional > other operations > should allow using .fn-methods to be a default value
Bug
19 - Additional > other operations > should insert binary uuid and retrieve it with not ordered uuid data
Bug
20 - Additional > other operations > should insert binary uuid and retrieve it
Bug
21 - Joins > has a leftJoin method parameter to specify the join type
Bug
Change truncate to drop table for restart sequences on oracle!
22 - Joins > supports join aliases with advanced joins
Bug
23 - Joins > left join with subquery in on clause, #
Bug
24 - Joins > json joins > join on json path value
Bug
25 - Selects > returns an array of a single column with `pluck`
Bug
26 - Selects > can pluck a qualified column name, knex#1619
Bug
27 - Selects > starts selecting at offset
Bug
28 - Selects > knex#4199 - ignores invalid hint comments
Bug
29 - Selects > returns a single entry with first
Bug
30 - Selects > returns a stream if not passed a function
Bug
31 - Selects > emits error on the stream, if not passed a function, and query fails
Bug
32 - Selects > uses "orderBy"
Bug
33 - Where > simple "where" cases > allows key, value
Bug
34 - Where > simple "where" cases > allows key, operator, value
Bug
35 - Where > simple "where" cases > allows a hash of where attrs
Bug
36 - Updates > should allow returning for updates
Bug
37 - Updates > should allow returning for updates with specific transaction
Bug
38 - Checks > create table with raw check on table
Bug
39 - Schema (misc) > createTable > sets default values with defaultTo
Bug
40 - Schema (misc) > dropTable > should drop a table
Bug
Error: drop table "test_table_three" - ORA-00942: table or view does not exist Help: https://docs.oracle.com/error-help/db/ora-00942/
41 - Schema > Primary keys > createPrimaryKey > create multiple primary keys with increments on same column
Bug
42 - Schema > Primary keys > createPrimaryKey > create multiple primary keys with increments on other columns
Bug
43 - Views > view > create materialized view
Bug