Refactor teams service methods (#910)

- Move team-related service methods to `ee/server/service`.
- Instantiate different service on startup based on license key.
- Refactor service errors into separate package.
- Add support for running E2E tests in both Core and Basic tiers.
This commit is contained in:
Zach Wasserman
2021-05-31 17:07:51 -07:00
committed by GitHub
parent 9876dbe6b6
commit 417ef2c9b6
61 changed files with 813 additions and 694 deletions
+28 -3
View File
@@ -135,9 +135,18 @@ E2E tests are run using Docker and Cypress.
Make sure dependencies are up to date and the [Fleet binaries are built locally](./1-Building-Fleet.md).
For Fleet Core tests:
```
make e2e-reset-db
make e2e-serve
make e2e-serve-core
```
For Fleet Basic tests:
```
make e2e-reset-db
make e2e-serve-basic
```
This will start a local Fleet server connected to the E2E database. Leave this server running for the duration of end-to-end testing.
@@ -154,16 +163,32 @@ Tests can be run in interactive mode, or from the command line.
#### Interactive
For Fleet Core tests:
```
yarn cypress open
CYPRESS_FLEET_TIER=core yarn cypress open
```
For Fleet Basic tests:
```
CYPRESS_FLEET_TIER=basic yarn cypress open
```
Use the graphical UI controls to run and view tests.
#### Command line
For Fleet Core tests:
```
yarn cypress run
CYPRESS_FLEET_TIER=core yarn cypress run
```
For Fleet Basic tests:
```
CYPRESS_FLEET_TIER=basic yarn cypress run
```
Tests will run automatically and results are reported to the shell.