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

chore: integration test for rETL flow #4324

Merged
merged 5 commits into from
Feb 6, 2024
Merged

chore: integration test for rETL flow #4324

merged 5 commits into from
Feb 6, 2024

Conversation

lvrach
Copy link
Member

@lvrach lvrach commented Jan 16, 2024

Description

An integration test for the recently added /retl endpoint. This new endpoint lets users also provide destination id to which they want to route their events to. Tests added to verify sources stats' behaviour has remained the same.

Linear Ticket

linear resolves PIPE-701

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Copy link
Contributor

coderabbitai bot commented Jan 16, 2024

Important

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@lvrach lvrach changed the title Chore/retl test chore(test): Introduce integration test for rETL flow Jan 16, 2024
@Sidddddarth Sidddddarth changed the base branch from master to release/1.19.x January 17, 2024 01:07
@Sidddddarth Sidddddarth changed the base branch from release/1.19.x to master January 17, 2024 03:00
@Sidddddarth Sidddddarth changed the title chore(test): Introduce integration test for rETL flow chore: Introduce integration test for rETL flow Jan 17, 2024
@Sidddddarth Sidddddarth changed the title chore: Introduce integration test for rETL flow chore: Introduce integration test for rETL flow Jan 17, 2024
@Sidddddarth Sidddddarth changed the title chore: Introduce integration test for rETL flow chore: integration test for rETL flow Jan 17, 2024
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0452e5b) 74.02% compared to head (8bd20b9) 74.08%.
Report is 9 commits behind head on master.

❗ Current head 8bd20b9 differs from pull request most recent head df25c2f. Consider uploading reports for the commit df25c2f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4324      +/-   ##
==========================================
+ Coverage   74.02%   74.08%   +0.05%     
==========================================
  Files         381      381              
  Lines       54404    54407       +3     
==========================================
+ Hits        40272    40306      +34     
+ Misses      11849    11816      -33     
- Partials     2283     2285       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

integration_test/retl_test/retl_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/webhook_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/webhook_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/sut_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/webhook_test.go Outdated Show resolved Hide resolved
t.Fail()
return
}
if res.Status != "200 OK" {
Copy link
Member

Choose a reason for hiding this comment

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

Why not check the status code?

Suggested change
if res.Status != "200 OK" {
if res.StatusCode != http.StatusOK {

integration_test/retl_test/sut_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/retl_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/sut_test.go Outdated Show resolved Hide resolved
integration_test/retl_test/retl_test.go Outdated Show resolved Hide resolved
@Sidddddarth Sidddddarth marked this pull request as ready for review January 22, 2024 07:48
@Sidddddarth Sidddddarth force-pushed the chore/retl-test branch 2 times, most recently from 5bf9b11 to f4fa181 Compare January 23, 2024 14:45
@Sidddddarth Sidddddarth force-pushed the chore/retl-test branch 2 times, most recently from 36ed083 to b840876 Compare January 31, 2024 09:17
@Sidddddarth Sidddddarth force-pushed the chore/retl-test branch 3 times, most recently from a163d83 to 8bd20b9 Compare February 1, 2024 13:48
var transformerContainer *destination.TransformerResource

containersGroup.Go(func() (err error) {
postgresContainer, err = resource.SetupPostgres(pool, t)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you need to change these, it now is postgres.Setup(pool, t).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I pushed the changes @lvrach

@lvrach lvrach merged commit 3a41222 into master Feb 6, 2024
39 of 40 checks passed
@lvrach lvrach deleted the chore/retl-test branch February 6, 2024 15:23
This was referenced Feb 9, 2024
atzoum pushed a commit that referenced this pull request Feb 12, 2024
---------

Co-authored-by: siddarth.msv <siddarthmsv+1@gmail.com>
Co-authored-by: Francesco Casula <fra.casula@gmail.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.

None yet

4 participants