Skip to content

Conversation

dkarpele
Copy link
Collaborator

Add e2e test for write-back GIT repository as annotation.

  1. 007-git-repository: use local kustomize app with local image. Annotations:
  • write-back-method: git
  • git-repository:local_repo

03-run-updater-revert.yaml reverts the changes made to local git repo to make all tests consistent. Without it the next run of this test or any other test that uses 001-simple-kustomize-app will fail.

  1. 008-git-repository-helm: use local helm app with public image. Annotations:
  • write-back-method: git
  • git-repository:local_repo.

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.49%. Comparing base (44fef15) to head (c4ab12b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1068   +/-   ##
=======================================
  Coverage   63.49%   63.49%           
=======================================
  Files          15       15           
  Lines        2326     2326           
=======================================
  Hits         1477     1477           
  Misses        758      758           
  Partials       91       91           

☔ View full report in Codecov by Sentry.
📢 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.

* install ArgoCD Helm Application to the test cluster with GIT write-back method
* run argocd-image-updater
* assert that the expected image was installed
* uninstall Application from the test cluster
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason this test does not undo the changes to 008-simple-helm-app/.argocd-source-image-updater-008.yaml, similar to 007-git-repository?

Copy link
Collaborator Author

@dkarpele dkarpele Mar 18, 2025

Choose a reason for hiding this comment

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

The difference between test 7 and 8 is in argocd-image-updater.argoproj.io/write-back-target: kustomization in test 7. Test 7 changes 001-simple-kustomize-app/kustomization.yaml file itself while test 8 adds file .argocd-source-image-updater-008.yaml.

Test 8 was originally copied from Test 2. Test 2 also doesn't have revert git commit back step. Because of the file name (with 008) it doesn't break other tests in the test suite. I can work on the implementation of the revert step for Test 8 and Test 2 in this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So, I added a revert step only to Test 8.
Test 2 doesn't check image name equality that's why Test 2 passes always - even after retry. So reverting commit for Test 2 is just not necessary.

Add e2e test for write-back GIT repository as annotation.
1. 007-git-repository: use local kustomize app with local image.
Annotations:
- `write-back-method: git`
- `git-repository:local_repo`

2. 008-git-repository-helm: use local helm app with public image.
Annotations:
- `write-back-method: git`
- `git-repository:local_repo`.

Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
@dkarpele dkarpele force-pushed the dkarpele-e2e-git-write-back branch from 2df5ec3 to c4ab12b Compare March 19, 2025 15:41
@chengfang chengfang merged commit 2c479a2 into argoproj-labs:master Mar 19, 2025
10 of 11 checks passed
@dkarpele dkarpele deleted the dkarpele-e2e-git-write-back branch March 19, 2025 19:35
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.

3 participants