Skip to content

chore: Break Gitea e2e tests down - #2889

Merged
zakisk merged 1 commit into
tektoncd:mainfrom
KMI1011:chore/2828-break-gitea-e2e-test/SRVKP-13053
Aug 4, 2026
Merged

chore: Break Gitea e2e tests down#2889
zakisk merged 1 commit into
tektoncd:mainfrom
KMI1011:chore/2828-break-gitea-e2e-test/SRVKP-13053

Conversation

@KMI1011

@KMI1011 KMI1011 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

📝 Description of the Change

Break down the monolithic Gitea E2E test file (42 tests) into 8 focused files grouped by concern: remote tasks, concurrency, YAML errors, error snippets, push events, CLI, event filtering, and provenance. No test behavior changes.

🔗 Linked GitHub Issue

Fixes #2828

🧪 Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

🤖 AI Assistance

AI assistance can be used for various tasks, such as code generation,
documentation, or testing.

Please indicate whether you have used AI assistance
for this PR and provide details if applicable.

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.
    (General advice/testing usage)

Important

Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer to your commit message.
For example:

Co-authored-by: Claude noreply@anthropic.com

✅ Submitter Checklist

  • 📝 My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • ♽ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • 📖 I have added or updated documentation for any user-facing changes.
  • 🧪 I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • 🔎 I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

@KMI1011 KMI1011 changed the title Chore/2828 break gitea e2e test/srvkp 13053 chore: Break Gitea e2e tests down Jul 27, 2026

@theakshaypant theakshaypant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @KMI1011 ! Please rebase and resolve the conflicts.

@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from 8ba8653 to 44126eb Compare July 28, 2026 14:23
@KMI1011

KMI1011 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

/ptal @theakshaypant

@chmouel

chmouel commented Jul 28, 2026

Copy link
Copy Markdown
Member

there is other existing gitea test should we merge them in that breakout?

Comment thread test/gitea_test.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Leaving just successRegexp here feels a bit odd to me. We can perhaps move it to test/pkg/gitea/, WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That would probably be better, I can get to doing that, I'll move it to test.go

@chmouel

chmouel commented Jul 29, 2026

Copy link
Copy Markdown
Member

please organise your commits and remove those git trailers that is added by others

@KMI1011

KMI1011 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

there is other existing gitea test should we merge them in that breakout?

From what I can tell I think it'd depend (?) Like if you think for ex, specifically gitea_results_annotation_test.go could merge into another file, it could work but I think it being split into distinct concerns as is makes it easier to track imho.

@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch 2 times, most recently from e6872a2 to eaef909 Compare July 31, 2026 14:09

@theakshaypant theakshaypant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests are broken, please refer the failed CI.

@zakisk
zakisk force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from eaef909 to 9e16b38 Compare August 3, 2026 10:52
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.77%. Comparing base (d7afe8b) to head (06cb53f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2889   +/-   ##
=======================================
  Coverage   68.77%   68.77%           
=======================================
  Files         197      197           
  Lines       16866    16866           
=======================================
  Hits        11599    11599           
  Misses       4405     4405           
  Partials      862      862           
Flag Coverage Δ
unit-tests 68.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zakisk

zakisk commented Aug 3, 2026

Copy link
Copy Markdown
Member

@KMI1011 I think you did this from an old branch because we've removed repo.Status in a recent PR but your still using that old code

@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from 9e16b38 to d22b3c4 Compare August 3, 2026 13:18
@KMI1011

KMI1011 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

If you're available /ptal @zakisk, I think I caught the issue you were referring to

Comment thread test/gitea_concurrency_test.go Outdated
// It will create a new branch and push a new Pull Request with a PipelineRun of
// the same name of the first PR and make sure PipelineRun of the same name only
// acts on the same Pull Request and not on the one of the others.
func TestGiteaConfigCancelInProgress(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

create one another file gitea_pull_request_test.go put some unique kind of test e.g. cancel-in-progress tests TestGiteaConfigCancelInProgress TestGiteaConfigCancelInProgressAfterPRClosed TestGiteaPullRequestPrivateRepository

@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from d22b3c4 to 39e46cb Compare August 3, 2026 15:26
@zakisk

zakisk commented Aug 3, 2026

Copy link
Copy Markdown
Member

pre-commit is local thing and your commit message contains:

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

can you please also remove that

@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from 39e46cb to 3f6f2b6 Compare August 3, 2026 17:32
@KMI1011
KMI1011 requested a review from theakshaypant August 3, 2026 17:33
@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from 59dbbcc to 1c5b0f8 Compare August 3, 2026 18:45
Break down the monolithic Gitea E2E test file (42 tests) into
8 focused files grouped by concern: remote tasks, concurrency,
YAML errors, error snippets, push events, CLI, event filtering,
and provenance. No test behavior changes.

Fixes tektoncd#2828
@KMI1011
KMI1011 force-pushed the chore/2828-break-gitea-e2e-test/SRVKP-13053 branch from 1c5b0f8 to 06cb53f Compare August 3, 2026 18:46
@zakisk

zakisk commented Aug 4, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@zakisk
zakisk merged commit f9e1a7a into tektoncd:main Aug 4, 2026
16 of 25 checks passed

@theakshaypant theakshaypant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see the PR has been merged but I would advise you to create a follow up for this.

Comment on lines +199 to +205
// TestGiteaConfigCancelInProgress will test the pipelinerun annotation
// `pipelinesascode.tekton.dev/cancel-in-progress: "true", it will first start
// one Pull Request which will run a PipelineRun and then send a /retest which
// should cancel the in progress one.
// It will create a new branch and push a new Pull Request with a PipelineRun of
// the same name of the first PR and make sure PipelineRun of the same name only
// acts on the same Pull Request and not on the one of the others.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Misplaced comment for TestGiteaConfigCancelInProgress

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.

Break Gitea e2e tests

6 participants