* tsconfig loosened to match api
* integration test folder and script
* .env mock isn't needed
* mock-env, locations of tests
* I was wrong.
* Updated progress
* schemas => getSchema(), exported getColumnPreprocessor()
* change imports to allow build
* add MockClient as DB Client (should mock getDBClient())
* move authservice into. not used elsewhere
* test passing
* remove unneeded test for this PR
* removed unneded fields from rawItem
* formatting
* createOne test passing
* typo
* removed int specific jest.config
* use systemSchema over getSchema()
* this.knex over getDatabase()
* mock getDatabaseClient
* removed unused mock-env
* formatting
* removed unused collections from schema
* response => responseOnce
* more direct
* unused var
* more tests please!
* test for: createOne no permissions
* removed broken test for now
* clean up
* readOne tests what does into db and returned
* added bindings check
* added into db sql check
* moved tests outside src
* changed ts config
* cli test location changed
* removed looking for tests in src
* readding it for e2e tests? Seems fishy
* Integration tests for ItemsService user tables (#11208)
* renamed ItemsService test to match src file name
* add user table schema
* system/user tables use .each, formatting needed
* format system and user better in title
* tables/table=> schemas/schema
* filter _eq test passing
* comment for later and formatting
* everything in it's right place
* future proofing as more fields are added
* removed duplicate test
* formatting
* readMany() filter: _or
Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
* added knex check before getDatabase()
* Move util test to tests folder
Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* base changes for cockroachdb
* allow creating of tables
* allow deleting of fields
* allow deleting of tables
* rebase
* fix migrations
* bump knex-schema-inspector to 1.7.0
* Update package-lock
* Add cockroach to debugging docker-compose file
* Remove unused import
* Tweak name in example.env
* Force nullable primary keys in cockroach
* Tweak shares migration to run on cockroach
* Rename var for clarification
* suggestion for migration helper
* change to schema and update remaining migrations
* Remove custom cockroach schema in favor of sharing with pg
* Fix migrations for CockroachDB
* Hopefully fix Oracle migrations 🤞🏻
* Make ~~aiden~~ oracle happy
* Resolve branching paths in migrations
* Enable tests for cockroach
* Fix test config
* One more config change for good measure
* Adjust test to match cockroach's bigint auto-int structure
* Increase request timeout for mssql
* Update api/src/database/helpers/schema/types.ts
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
* Enable end-to-end tests for Oracle and SQLite
* Add Oracle back to allVendors
* Use yum
* Use dnf
* Actually use yum
* Actually use dnf
* Actually use yum
* Try again
* Try manual install
* Fix env declaration
* Bump knex version (because https://github.com/knex/knex/issues/4844)
* Set max pool size for Oracle
* Add awaitDatabaseConnection
* Cache install and build step
* Run different tests sequentially
* Fix workflow name
* Show test results
* Fix names
* Fix success check
* Fix outputs
* Add oracle driver install
* Fix env
* Revert to previous structure to benchmark performance
* Only build specs and drive packages for unit tests
* Don't install everything to run linters
* Use this branch
* Fix missing lint dep
* Revert "Don't install everything to run linters", also build shared package
* Skip app build for tests
* Don't serve app for e2e tests
* Change time fields to timestamp becaues of inconsistencies between vendors
* Make npm ci faster
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Refactor e2e tests
* Only install root dependencies for lint step
* Fix dumbest error ever
* Pass process.env too to spawned subprocess
* Suppress npm package installation prompt
* Improve error handling
* Add new compose file for tests
* Avoid port conflict with remoted
* Update docker-compose.yml
* Add test docs
* Use current branch workflow files and simplify skips
* Fix workflow file
* Fix workflow file
* Try adding `.yml` extension to allow reference in `uses`
* Place workflow file in folders to allow reference in `uses`
* Requires more work than expected, reverting
* Update docs to use correct compose file
* Remove comment / unused code
* Run tests from main
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* mock-knex
* test on the migrations run started.
* test passing for run.up()
* reorganize /tests/ to allow integration tests
* e2e setup changes
* e2e jest.config moved
* e2e paths fixed, integration config
* add nonadmin role and user seed+migration
* auth/login w/ documentation (docs will be moved)
* update user seed
* add postgres10 to the ci?
* argon2 saves the day
* items tests passing with postgres10 support
* removed comments
* move generateHash out of directus_users
Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
* reorganized for sanity
* filter tests for _eq/_neq
* logical operators
* update one one to many
* /:collection PATCH one to many
* base tables.id => uuids to minimize collisions
* tests pass
* added python to dockerfile
* tests passing
* ci?
* ci...
* hanging async
* get many m2o, create many m2o, expand seedTable()
* get many error handling
* added artists_events relation
* test for artists_events relations
* test for getOne m2m
* get many artists_events
* create one many-to-many
* updated createMany() for join tables
* create many artists_events
* tests for update one many to many
* removed stray "only"
* update many many to many
* improved update many
* tests for delete one artists_events
* delete many many to many tests
* update one + delete one with no relations
* removed only
* delete many artists with no relations
* added faker.js for testing
* edited env vars removed sqlite from testing (temp)
* getMany endpoint working with no data
* converted to faker
* getOne test passing
* schema for relations, item creation => factory
* many to many test working, factory refactored
* faker as dev dep
* new schema, tests passing postgres json exception
* tests passing
* upgrade tedious
* images
* removed images, rebuilt package-lock.json
* added users and schema map(WIP)
* user => artist m2o relation working on fields
* downgrade tedious
* user => guest, each => all
* items/:collection/invalid_id test
* items/invalid_collection/:id test added
* /:collection POST createOne test
* createMany factory, createMany endpoint test
* error handling tests
* create many with a many to one
* createMany with options to link relations
* some more describe sorting
* factory tests working
* tests passing
* added faker
* added factories and tests
* removed unnecessary factory
* new schema
* seedTable test
* included all dbs in db relevant tests
* json string for insert in dbs that aren't postgres
* added organizer
* polished up geometry types
* added raw option to seedTable return
* forgot await disonnect
* createMany func with test
* remove an only
* createMany w/ options for relations and tests
* tests for json field
* removed an only
* json support
* factories working, ignore tests leaving for future
* schema now represented in migrations (untested)
* seeds (untested)
* added seeding and fixed seed id #s
* removed run-migrations, not migrating .ts files
* setup.ts runs with migrate and seed
* removed unneeded console.log()
* guest id is uuid, because I can
* added guest_events, changed user => guest
* updated column types
* removing system_tables migration file
* fixed many to one relation for favorite_artist
* added relational tables to collections
* fixed relations
* geometry fields
* updated schema
* update dependency @types/dockerode to v3.2.7
* Fix type error in test setup
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Declare return types on functions
And a very few other type related minor fixes
* Minor syntax fixes
* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)