Skip to content

Update git tests#5927

Closed
edmundmiller wants to merge 7 commits intonextflow-io:masterfrom
edmundmiller:git-tests
Closed

Update git tests#5927
edmundmiller wants to merge 7 commits intonextflow-io:masterfrom
edmundmiller:git-tests

Conversation

@edmundmiller
Copy link
Member

An updated attempt and cleaned up from #5711

This is a PR that's pre-work for #4427.

I cleaned up some of the tests in #5610 and @tom-seqera suggested splitting them into separate PRs

While I agree with efforts to improve the naming and clarity of the tests, doing so alongside changes to behaviour introduces a lot of noise. I'd suggest splitting such changes into a separate PR which improves the tests without modifying any behaviour.

I'll follow this up with a PR introducing the features for #4427 after.

…thod

Modify git repository initialization in test to use Git.init() with explicit master branch setting

Signed-off-by: Edmund Miller <[email protected]>
…it config scenarios

Expand test coverage for Git configuration parsing by adding scenarios for:
- Multiple remote URLs
- Non-default branch configurations
- Custom default branch names

Signed-off-by: Edmund Miller <[email protected]>
…module configuration

Expand AssetManagerTest with new scenarios:
- Handling gitmodules configuration with list and string inputs
- Testing manifest file parsing with malformed and missing configurations
- Adding submodule operations test
- Verifying repository error handling

Signed-off-by: Edmund Miller <[email protected]>
…ility and structure

- Consolidate assertions using 'with' for better clarity.
- Update test names for consistency and clarity.
- Enhance gitmodules configuration tests to handle both array and string formats.

Signed-off-by: Edmund Miller <[email protected]>
@netlify
Copy link

netlify bot commented Mar 26, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 1d2da41
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/67e46d4585227900083056a6

Comment on lines +342 to +351
def 'should create hub provider for #providerName'() {
when:
def manager = new AssetManager()
def repo = manager.createHubProvider('github')
then:
repo instanceof GithubRepositoryProvider

when:
manager = new AssetManager()
repo = manager.createHubProvider('bitbucket')
then:
repo instanceof BitbucketRepositoryProvider
def repo = manager.createHubProvider(providerName)

when:
manager = new AssetManager()
repo = manager.createHubProvider('gitlab')
then:
repo instanceof GitlabRepositoryProvider

when:
manager = [:] as AssetManager
manager.createHubProvider('xxx')
then:
thrown(AbortOperationException)
repo instanceof RepositoryProvider

where:
providerName << ['github', 'bitbucket', 'gitlab']
Copy link
Member

Choose a reason for hiding this comment

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

It's not validating that for a given provider name is creating the expected provider class

@bentsherman bentsherman requested a review from tom-seqera March 28, 2025 09:27
@edmundmiller edmundmiller marked this pull request as draft April 9, 2025 13:53
@pditommaso pditommaso force-pushed the master branch 3 times, most recently from b4b321e to 069653d Compare June 4, 2025 18:54
@pditommaso
Copy link
Member

Looks like this pull request lost the momentum. Closing for now.

@pditommaso pditommaso closed this Jul 6, 2025
@edmundmiller edmundmiller linked an issue Sep 23, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants