1
0
Fork 0
mirror of synced 2024-09-27 14:51:28 +12:00
Commit graph

206 commits

Author SHA1 Message Date
Michael Drury
1c7c06e983 Bulk of the automation plugin system, supporting custom plugins. 2023-04-10 23:48:54 +01:00
Adria Navarro
cfb93063b2 Merge pull request #10153 from Budibase/budi-6803-delete-users-when-group-removed
BUDI-6803 - Remove users that should not be there anymore when syncGlobalUsers
2023-03-31 13:15:11 +02:00
adrinr
48b964378b Remove all app cookie references (not really needed anymore) 2023-03-31 09:01:40 +01:00
adrinr
4cb6b99982 Types 2023-03-29 16:42:55 +01:00
mike12345567
cf5316ec8d General fixes for open handles, attempting to find and close all issues in server which are stopping shutdown of Jest suite. 2023-03-27 19:38:49 +01:00
mike12345567
82286d519f Fixing some issues with test cases. 2023-03-21 17:27:31 +00:00
Rory Powell
e116941750 Rotatable secrets (#9982)
* Rotatable secrets

* Set new api encryption key var

* Lint

* Use fallback keys instead of array

* Point api encryption key to dedicated value

* Add API_ENCRYPTION_KEY to cli

* Lint + add api encryption key to env files
2023-03-13 15:02:59 +00:00
Martin McKeaveney
26660b12fb PR comments 2023-03-06 10:33:49 +00:00
Rory Powell
4e1bebe897 Server flaky tests fixes - improving tenancy config 2023-02-23 13:43:27 +00:00
Rory Powell
a57f0c9dea Merge branch 'develop' into rory/february 2023-02-20 09:57:17 +00:00
Rory Powell
ae9979929a Enable higher concurrency and resiliency in worker tests 2023-02-13 11:57:30 +00:00
mike12345567
7def2059f7 Updating test case which has been occasionally throwing 409 issues. 2023-02-10 18:29:29 +00:00
Mateus Badan de Pieri
89bad2d45a Merge branch 'develop' into tests/environment-variables 2023-02-07 16:15:57 +00:00
adrinr
452147c308 Cleanup tests 2023-02-07 12:45:41 +00:00
adrinr
9bb1a2fa18 Merge remote-tracking branch 'origin/develop' into test/9339-sqlpostgres-row-api-test-suite 2023-02-06 09:12:13 +00:00
adrinr
4cab97b8ab Improve automation tests 2023-02-03 17:49:21 +00:00
adrinr
4a8db61b6b Fix automation timeouts 2023-02-03 16:28:29 +00:00
adrinr
2e29ac9ec7 Rename name for id 2023-02-03 12:09:56 +00:00
adrinr
4b4b9cce08 Fix ts 2023-02-03 11:30:30 +00:00
adrinr
5d58fc5948 Dry 2023-02-03 11:28:27 +00:00
adrinr
a80fc4aaa8 Remove isDockerisedTest 2023-02-02 10:50:20 +00:00
adrinr
4eb0c07953 Merge branch 'feature/dependencies-image' into test/9339-sqlpostgres-row-api-test-suite 2023-02-02 10:12:33 +00:00
adrinr
c7d0a077be Replace faker for chance 2023-02-01 17:11:50 +00:00
adrinr
2ab3680538 Fix installation race conditions 2023-01-31 17:27:25 +00:00
adrinr
abdd658012 Prepopulate dbs 2023-01-31 16:51:08 +00:00
mike12345567
263d588191 Environment variable test base. 2023-01-31 15:27:16 +00:00
Adria Navarro
16e53957bc Merge branch 'develop' into feature/dependencies-image 2023-01-30 18:54:05 +00:00
Rory Powell
da2c809a09 Merge branch 'develop' into feature/environment-variables 2023-01-27 11:27:11 +00:00
mike12345567
b38399cb74 Adding test cases as per PR comments. 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
b94546b1a1 Fix user test 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
33f1628000 Fix issues with parallel tests and self/cloud modes 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
6a4fe1d5e6 Fix automation test 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
9242470f6f Fix snapshots test 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
a54c1a1647 Set expected id 2023-01-26 18:20:21 +00:00
Adria Navarro Redo
067462f458 Use multitenancy for tests 2023-01-26 18:20:21 +00:00
mike12345567
697cd8b4ea Adding test cases as per PR comments. 2023-01-25 18:27:58 +00:00
Adria Navarro
6259ffad3b Wipe db before tests 2023-01-24 18:51:15 +00:00
Adria Navarro
9371f19419 Remove mocks 2023-01-24 17:48:49 +00:00
Adria Navarro
46994a45f9 Update openapi specs 2023-01-20 12:12:59 +00:00
Adria Navarro
27171e7680 Extra typings 2023-01-20 11:48:11 +00:00
Adria Navarro
62b372ce59 Fix broken tests 2023-01-20 10:29:11 +00:00
Adria Navarro
bcfb0f3727 Change tests to use internal apis 2023-01-19 17:23:48 +00:00
Adria Navarro
e13433557a Add search test 2023-01-19 11:00:51 +00:00
Adria Navarro
233f54f036 Add update test 2023-01-18 17:11:52 +00:00
Adria Navarro
4ae43f1a96 Retrieve row test 2023-01-18 16:46:40 +00:00
Adria Navarro
6bc658c1ff Fix types 2023-01-18 11:50:00 +00:00
Adria Navarro
1d66110d01 More typings 2023-01-18 10:45:42 +00:00
Adria Navarro
cc930097a8 Implement test 2023-01-17 17:39:59 +00:00
Adria Navarro
89e0610600 Add basic test 2023-01-17 17:22:31 +00:00
Adria Navarro
da8f7eff6c Delete apps on end 2023-01-17 10:28:51 +00:00
Adria Navarro
343a19250b Typing supertest parameters 2023-01-16 15:35:41 +00:00
mike12345567
fc5f6ca530 Adding the ability to store environment variables to context, to make them more easily available/re-usable, as well as exposing them to queries. 2023-01-13 19:53:46 +00:00
Rory Powell
fba7ef26ad Replace ts-jest with swc/jest (#9289)
- Add swc dependencies
- Add transform change to jest.config.ts
- Replace `export =` with `export default` in src code to enable code coverage to work with swc transformer
- Restructure backend-core errors package to allow for exporting error classes with ESM syntax
- Update backend-core to no longer use `export =`, export individual packages instead of replacing with `export default` for backwards compatibility
- Update event publishers to use `export default` - this was required for the `jest.spyOn` usage inside backend-core common mocks
- Restructure some jest.mock usages where declaring the jest.fn as a variable outside of the package mock threw an error
2023-01-11 09:37:37 +00:00
Martin McKeaveney
84ab7862d1 fixes for google sheets, admin checklist, and deleting an app from API (#8846)
* fixes for google sheets, admin checklist, and deleting an app from API

* code review

* splitting unpublish endpoint, moving deploy endpoint to applications controller. Still to do public API work and move deployment controller into application controller

* updating REST method for unpublish in API test

* unpublish and publish endpoint on public API, delete endpoint unpublishes and deletes app

* removing skip_setup from prodAppDb call

* removing commented code

* unit tests and open API spec updates

* unpublish, publish unit tests - delete still in progress

* remove line updating app name in API test

* unit tests

* v2.1.46

* Update pro version to 2.1.46

* v2.2.0

* Update pro version to 2.2.0

* Fix for budibase plugin skeleton, which utilises the old import style.

* Fix side nav styles

* v2.2.1

* Update pro version to 2.2.1

* using dist folder to allow importing constants for openAPI specs

* v2.2.2

* Update pro version to 2.2.2

* Fix for user enrichment call (updating to @budibase/nano fork) (#9038)

* Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters.

* Incrementing Nano version to attempt to fix yarn registry issues.

* v2.2.3

* Update pro version to 2.2.3

* Fix SQL table `_id` filtering (#9030)

* Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field

* Remove like operator from internal tables and only allow basic operators on SQL table _id column

* Update data section filtering to respect new rules

* Update automation section filtering to respect new rules

* Update dynamic filter component to respect new rules

* v2.2.4

* Update pro version to 2.2.4

* lock changes (#9047)

* v2.2.5

* Update pro version to 2.2.5

* Make looping arrow point in right direction (#9053)

* v2.2.6

* Update pro version to 2.2.6

* Types/attaching license to account (#9065)

* adding license type to account

* removing planDuration

* v2.2.7

* Update pro version to 2.2.7

* Environment variable type coercion fix (#9074)

* Environment variable type coercion fix

* Update .gitignore

* v2.2.8

* Update pro version to 2.2.8

* tests passing

* all tests passing, updates to public API response

* update unpublish call to return 204, openAPI spec and unit

* fixing API tests

Co-authored-by: Budibase Release Bot <>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Andrew Kingston <andrew@kingston.dev>
Co-authored-by: melohagan <101575380+melohagan@users.noreply.github.com>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-19 13:18:00 +00:00
Peter Clement
9d841bc947 Server and Worker tests (#8928)
* automation unit tests

* row processor tests

* update executeQuery test

* update groups assertion

* some more worker tests

* plugin tests and tidying up

* linting

* temporarily disable group tests

* more tests

* fix import

* fix backup tests

* add pro mocks to worker

* check for app existence in import test

* test new tsconfig

* testing changes

* Pro test utils (#9020)

* Pro test utils changes

* Add test fixes

* Remove ts-ignore

Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-12 22:02:32 +00:00
mike12345567
a02e9017ec Final fixes after re-running all test suites. 2022-11-28 19:12:23 +00:00
mike12345567
e62ebc8fbb Updates to fix build. 2022-11-28 13:24:39 +00:00
mike12345567
de82eca502 Some typescript conversions, moving a few imports around. 2022-11-21 18:33:34 +00:00
mike12345567
31c198888a Updating some enums, plural to single. 2022-11-17 14:59:18 +00:00
mike12345567
4328ed1b67 Updating middlewares to Typescript, as well as some fixes based on running tests. 2022-11-16 17:24:13 +00:00
mike12345567
535fab7997 Some major reworks towards higher levels of typescript. 2022-11-16 17:23:12 +00:00
Rory Powell
9973f2e161 Bump jest and ts-jest to be consistent across backend packages to fix CI issue, test config updates 2022-11-14 22:55:47 +00:00
mike12345567
3d98acc28a Minor test rework after improving startup, a lot of mocks weren't being used correctly. 2022-10-27 15:15:08 +01:00
Rory Powell
5614c5db61 Replace isTest check with mock for triggering app backup 2022-10-24 13:05:40 +01:00
mike12345567
8744d0a86c Renaming data source -> datasource as per Mel's request. 2022-09-14 12:11:20 +01:00
mike12345567
b803a3fd93 Replacing all plural TS enumerations with singular - this involves a major rename of the DocumentTypes. 2022-08-11 13:50:05 +01:00
Rory Powell
500e697974 Trigger served events on ping endpoint 2022-08-10 11:01:54 +01:00
mike12345567
3b4d7950d0 Merge branch 'master' of github.com:Budibase/budibase into fix/memory-leak 2022-07-14 16:40:23 +01:00
Rory Powell
1c4473ba30 WIP: Memory leak fix 2022-07-13 08:22:21 -04:00
Dean
28f722cf4b Fixes for Rest API request UI. Rest test fixes for XML API request body. Fix for raw XML api request body parsing issue. General fixes for query testing. 2022-06-17 12:00:42 +01:00
Rory Powell
7ebfaf8a31 Failover protection with event cache 2022-05-31 21:04:41 +01:00
Rory Powell
4841c84861 Merge branch 'feature/posthog-v2' into feature/event-backfill 2022-05-23 10:29:33 +01:00
Rory Powell
443b664e33 Finish global migration 2022-05-20 21:16:29 +01:00
Rory Powell
756f5b51aa App migrations finished 2022-05-20 12:29:31 +01:00
Rory Powell
8da427284c Stub out migrations + start tests + add build watching for backend-core 2022-05-18 10:56:44 +01:00
Rory Powell
1caf4b1965 Merge branch 'develop' into feature/posthog-v2 2022-04-27 16:32:00 +01:00
mike12345567
345bbf603c Fixing issues with test cases - a lot of test cases didn't setup tenancy in any format, which now means that the API endpoints they call would not have access to a Global DB instance. Also had to disable the closing of the database in test as this was removing the database from memory, meaning future calls would find an empty database when they opened it. 2022-04-21 14:56:14 +01:00
mike12345567
151ed604f8 Fixing some issues detected by the test cases, making the in-use mechanism for context more clear to complete avoid stack up of contexts (leading to loss of knowledge around previous databases. 2022-04-20 23:10:39 +01:00
mike12345567
192fb1307e Initial version of memory leak protection, making sure that PouchDB databases are closed correctly after use, using a combination of closures wrapping DB gets (this replaces the getDB, leaving only a dangerousGetDB function which can be used in very very specific scenarios) and then closing the DB as part of CLS hooked functions finishing. Also moving the GlobalDB init to the tenancy middleware as this is used everywhere in the worker/app services - means that not all getGlobalDB calls require an async closure around them. 2022-04-19 19:42:52 +01:00
Rory Powell
41144db055 Remove remaining direct usage of CouchDB. Add common pouch config to backend-core 2022-04-19 16:45:27 +01:00
Rory Powell
33719fcb09 Merge branch 'feature/licensing' into feature/posthog-v2 2022-04-12 17:12:46 +01:00
Rory Powell
befb61c915 smtp events + centralise worker test config 2022-04-06 17:00:17 +01:00
Rory Powell
ec4e9df4c2 Refactor automation tests to run independently 2022-04-06 12:34:31 +01:00
Rory Powell
6128dfadcf Logout events 2022-04-05 16:56:28 +01:00
Rory Powell
8d39bf9f2e sso auth + datasource events, test updates 2022-04-05 15:46:04 +01:00
Rory Powell
d0af6cc8ca App events 2022-04-04 15:59:00 +01:00
Rory Powell
15b676ce1c Remove remaining direct usage of CouchDB. Add common pouch config to backend-core 2022-03-29 16:03:44 +01:00
Rory Powell
819f9b75de Link app context with tenancy, remove app tenancy middleware 2022-03-24 13:04:49 +00:00
mike12345567
84ef694712 Fixing test case. 2022-02-28 18:53:03 +00:00
mike12345567
83d4994f55 Starting to fix up test cases. 2022-02-25 15:55:19 +00:00
Michael Drury
01bb56cbf4 Adding a testing system which generates the schema and compares against responses. 2022-02-24 23:21:10 +00:00
Maurits Lourens
a3626986a1 fix tests 2022-02-11 17:28:19 +01:00
mike12345567
476f34fb93 Merge branch 'develop' of github.com:Budibase/budibase into lab-day/refactor-app-db 2022-01-31 17:16:59 +00:00
mike12345567
e718b18127 Merge branch 'develop' of github.com:Budibase/budibase into lab-day/refactor-app-db 2022-01-31 14:09:07 +00:00
Rory Powell
54a32b41ef Merge branch 'develop' into feature/migrations-2.0 2022-01-30 22:37:11 +00:00
mike12345567
d5f8cc1023 Tests updating, all now passing, fixed some issues discovered by them. 2022-01-28 15:43:51 +00:00
Michael Drury
d3a90acc55 Final pass refactoring - need to test but all code in server converted. 2022-01-28 00:05:39 +00:00
mike12345567
d2fe119d90 Main body of work, refactoring most usages. 2022-01-27 18:18:31 +00:00
Rory Powell
767354ad60 Add app db support + app url migration 2022-01-27 10:40:31 +00:00
Rory Powell
ffcf5354eb Add CSRF Token 2022-01-25 22:54:50 +00:00