Skip to content
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

Reporting Test Serverless structure: api_integration #7

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

tsullivan
Copy link

@tsullivan tsullivan commented Aug 16, 2023

Summary

This PR adds some structure for API Integration tests for Reporting in serverless. I've added a single test to get started, a test to ensure users can only delete reports they've created.

Initially I planned to add a functional test for report deletion, but currently this is blocked: if we want to use our existing archive of reports, we need to log in as test_user which is the user that created the archived reports. In serverless functional tests, it looks like we're currently only able to test with the elastic user and that doesn't help us.

Next step: The next API Integration tests that will be ready to work on can be copied from:

  • x-pack/test/reporting_api_integration/reporting_and_security/csv_v2.ts
  • x-pack/test/reporting_api_integration/reporting_and_security/error_codes.ts
  • x-pack/test/reporting_api_integration/reporting_without_security/job_apis_csv.ts
  • x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts
  • x-pack/test/reporting_api_integration/reporting_and_security/security_roles_privileges.ts

Note: I would like to hold off on adding tests and services for usage, we might not need it.

@@ -46,5 +46,8 @@
"@kbn/test-subj-selector",
"@kbn/reporting-plugin",
"@kbn/rison",
"@kbn/core-http-common",
"@kbn/data-views-plugin",
"@kbn/core-saved-objects-server",
Copy link
Author

@tsullivan tsullivan Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how these lines were added 🤨

// const retry = getService('retry');
// const testSubjects = getService('testSubjects');

describe('Reporting Management', function () {});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't much we can do in functional tests until we have the ability to log in as a non-elastic user.

- x-pack/test_serverless/functional/test_suites/common/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/reporting/config.ts
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By design, the only serverless test suites are: observability, search, security and common. Reporting tests should go under common.


export const services = {
supertestWithoutAuth: apiIntegrationServices.supertestWithoutAuth,
usageAPI: apiIntegrationServices.usageAPI,
Copy link
Author

@tsullivan tsullivan Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to hold off on adding usage tests and services for now.

@rshen91 rshen91 merged commit 6d49f1e into rshen91:e2e-svl-reporting Aug 16, 2023
1 of 2 checks passed
rshen91 pushed a commit that referenced this pull request Sep 3, 2024
fixes
[#8](elastic/observability-accessibility#8)
fixes
[#7](elastic/observability-accessibility#7)
 
## Summary

Fixes APM breadcrumbs on serverless

| Serverless  |  Stateful  |
|---|---|
| <img width="700px" alt="image"
src="https://github.com/user-attachments/assets/944a7d58-7de3-4a7f-be02-3c8c1110a0e2">
|<img width="800px" alt="image"
src="https://github.com/user-attachments/assets/450664b1-ddfc-4395-9fa3-a7b941affb3b">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/944a7d58-7de3-4a7f-be02-3c8c1110a0e2">
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/450664b1-ddfc-4395-9fa3-a7b941affb3b">|
| <img width="500px" alt="image"
src="https://github.com/user-attachments/assets/944a7d58-7de3-4a7f-be02-3c8c1110a0e2">
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/cb8a39e2-ca33-4cf9-a8ac-4c84566d092d">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/151a3a9c-c81e-4558-9d00-e695e3d1d79c">|<img
width="500px" alt="image"
src="https://github.com/user-attachments/assets/2562e96f-d5e4-4aa4-a221-6721f8995883">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/8d877d11-8c3f-4ac5-8146-6a11125eae7c">|<img
width="500px" alt="image"
src="https://github.com/user-attachments/assets/36e588cb-4c18-4d66-a2c6-f0e66392f708">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/14253196-06de-4343-811f-61aa31ea0d1e">|<img
width="500px" alt="image"
src="https://github.com/user-attachments/assets/0cdfc83f-6545-433f-8c14-5bbf2a581175">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/89a58e2b-2cef-4188-b2be-f359ba6890db">|<img
width="500px" alt="image"
src="https://github.com/user-attachments/assets/f15e767f-5b60-4485-ac71-7b6fd850ec50">|
|<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/a0f7bfae-bfda-4f49-b92a-e736d80fea4c">|<img
width="500px" alt="image"
src="https://github.com/user-attachments/assets/680db8ab-58b8-454b-a0d7-6e1681dbe616">|


### How to test
#### Serverless
- Start a local ES serverless instance: `yarn es serverless
--projectType=oblt --ssl -k/--insecure`
- Start a local Kibana serverless instance: ` yarn start
--serverless=oblt --no-ssl`
- Run some synthtrace scenarios
- `NODE_TLS_REJECT_UNAUTHORIZED=0 node scripts/synthtrace mobile.ts
--live --target=https://elastic_serverless:changeme@127.0.0.1:9200
--kibana=http://elastic_serverless:changeme@0.0.0.0:5601`
- `NODE_TLS_REJECT_UNAUTHORIZED=0 node scripts/synthtrace service_map.ts
--live --target=https://elastic_serverless:changeme@127.0.0.1:9200
--kibana=http://elastic_serverless:changeme@0.0.0.0:5601`
- Navigate to Applications and click through the links

### Stateful
- Start a local ES and Kibana instance
- Run the some synthtrace scenarios:
  -  `node scripts/synthtrace mobile.ts --live`
  -  `node scripts/synthtrace service_map.ts --live`
- Navigate to Applications and click through the links

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants