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

[tests-only][full-ci] implement DRY principle #6553

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

PrajwolAmatya
Copy link
Contributor

@PrajwolAmatya PrajwolAmatya commented Jun 19, 2023

Description

This PR implements the DRY principle on the existing code.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Jun 19, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ownclouders
Copy link
Contributor

💥 Acceptance test localApiTests-apiContract-ocis failed. Further test are cancelled...

@PrajwolAmatya PrajwolAmatya changed the title implement DRY principle [tests-only][full-ci] implement DRY principle Jun 20, 2023
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch 5 times, most recently from e3a3176 to 89f7044 Compare June 21, 2023 03:59
@PrajwolAmatya PrajwolAmatya marked this pull request as ready for review June 21, 2023 04:29
@PrajwolAmatya PrajwolAmatya requested a review from SwikritiT June 21, 2023 08:36
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from 89f7044 to fcefcfd Compare June 21, 2023 09:37
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from fcefcfd to 6b2bfc6 Compare June 22, 2023 06:18
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from 6b2bfc6 to be40ed1 Compare June 22, 2023 07:06
Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

This is a helper function and we should not save the response in any helpers - saving might lead to unexpected behaviors. We should only save response in the When steps.

Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

Same with this function

@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from be40ed1 to e6b8bec Compare June 23, 2023 06:23
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch 2 times, most recently from 95732de to 2a644ba Compare June 23, 2023 06:45
Copy link
Member

@SagarGi SagarGi left a comment

Choose a reason for hiding this comment

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

seems good refactor that the response is not set in the helper function but the step implementation. Overall LGTM 👍

@SagarGi SagarGi requested a review from ScharfViktor June 26, 2023 04:00
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch 2 times, most recently from 9244f37 to ad8f09d Compare June 26, 2023 06:31
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from ad8f09d to 68a96d0 Compare June 26, 2023 06:44
Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

Let's reduce the external dependency wherever posssible

@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch 2 times, most recently from 740acfd to 52ef34c Compare June 27, 2023 08:49
@PrajwolAmatya PrajwolAmatya force-pushed the implement-dry-principle branch from 52ef34c to f2bc0c0 Compare June 27, 2023 08:58
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

LGTM

@saw-jan saw-jan merged commit 0b67887 into master Jun 28, 2023
@phil-davis phil-davis deleted the implement-dry-principle branch June 28, 2023 05:12
ownclouders pushed a commit that referenced this pull request Jun 28, 2023
fschade pushed a commit that referenced this pull request Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants