Skip to content

Conversation

klaskosk
Copy link
Collaborator

As part of an effort to decouple and make reusable the gitdetails helper from cnf/ran in eco-gotests, this PR adds more generic versions of these helpers as methods on the Application builder itself.

WithGitPathAppended is a more specific version of WithGitDetails that is more aligned with the common use case of updating to use a subdirectory of the git repo. WithGitDetails may still be used to update all of the git details if necessary.

DoesGitPathExist can be called similar to WithGitPathAppended and checks if that path would exist. The way it checks should be mostly portable between git hosts, at least enough to cover the common cases.

WaitForSourceUpdate allows verifying a change to the Application's source has taken effect.

As part of an effort to decouple and make reusable the gitdetails helper from cnf/ran in eco-gotests, this PR adds more generic versions of these helpers as methods on the Application builder itself.

WithGitPathAppended is a more specific version of WithGitDetails that is more aligned with the common use case of updating to use a subdirectory of the git repo. WithGitDetails may still be used to update all of the git details if necessary.

DoesGitPathExist can be called similar to WithGitPathAppended and checks if that path would exist. The way it checks should be mostly portable between git hosts, at least enough to cover the common cases.

WaitForSourceUpdate allows verifying a change to the Application's source has taken effect.
@klaskosk
Copy link
Collaborator Author

cc: @josclark42

klaskosk added a commit to klaskosk/eco-gotests that referenced this pull request May 14, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary.

The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
@klaskosk klaskosk merged commit 681e897 into rh-ecosystem-edge:main May 15, 2025
5 checks passed
klaskosk added a commit to klaskosk/eco-gotests that referenced this pull request May 15, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary.

The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk added a commit to klaskosk/eco-gotests that referenced this pull request Jul 3, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary.

The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk added a commit to klaskosk/eco-gotests that referenced this pull request Jul 8, 2025
Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary.

The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.
klaskosk added a commit to rh-ecosystem-edge/eco-gotests that referenced this pull request Jul 8, 2025
* cnf ran: refactor gitopsztp to use new git methods

Related to rh-ecosystem-edge/eco-goinfra#1039, this commit refactors the gitopsztp suite to incorporate the new methods introduced for the ApplicationBuilder. Although it is slightly longer since the checking for existence is broken apart from updating and waiting for sync, this allows some more flexibility for cases where this is necessary.

The gitdetails package is left although it has a significantly reduced scope. Since the goal is to allow better reuse of code relating to ZTP, the smaller gitdetails is ultimately beneficial.

* cnf ran: fix IBBF labels issue

The default is to match all labels in a label filter, so the logic to not run the suite-level BeforeEach for IBBF tests was wrong. This commit fixes it with an equally temporary solution.
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