Skip to content

Fix/lifecycle tests local artifactory - #3260

Closed
agrasth wants to merge 8 commits into
masterfrom
fix/lifecycle-tests-local-artifactory
Closed

agrasth wants to merge 8 commits into
masterfrom
fix/lifecycle-tests-local-artifactory

Conversation

@agrasth

@agrasth agrasth commented Dec 9, 2025

Copy link
Copy Markdown
Contributor
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • The pull request is targeting the master branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....

Comment thread artifactory_test.go
err := accessManager.DeleteProject(projectKey)
if err != nil {
if !strings.Contains(err.Error(), "Could not find project") {
t.Error(t, err)

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.

t.Error(t, err) : Tries to print the testing object itself, then the error

…ta issues

## Problem
Lifecycle tests were failing with 'Cannot create project, Max number of
projects is reached' because they used a shared remote platform that
accumulated orphaned test projects from failed test runs.

## Solution
Switch lifecycle tests to use local Artifactory installation, matching
the pattern used by all other test suites.

## Changes
- Use jfrog/.github/actions/install-local-artifactory@main
- Connect to http://127.0.0.1:8082 instead of secrets.PLATFORM_URL
- Use auto-generated JFROG_TESTS_LOCAL_ACCESS_TOKEN
- Add macOS skip logic (JGC-413)
- Explicit OS version matrix for consistency
- Fix syntax error in deleteProjectIfExists: t.Error(t, err) -> t.Error(err)

## Benefits
- No shared state between test runs
- No manual cleanup required
- Better test isolation
- Consistent with other test workflows
- Each test run gets fresh Artifactory instance
@agrasth
agrasth force-pushed the fix/lifecycle-tests-local-artifactory branch from d822178 to 85efe66 Compare December 9, 2025 10:27
@agrasth agrasth added ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request labels Dec 9, 2025
@agrasth agrasth removed the safe to test Approve running integration tests on a pull request label Dec 9, 2025
@agrasth agrasth added the safe to test Approve running integration tests on a pull request label Dec 9, 2025
@agrasth agrasth added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Dec 9, 2025
…ta issues

- Switch lifecycle tests from remote platform to local Artifactory installation
- Aligns with pattern used by all other test suites (artifactory, transfer, access, etc.)
- Fixes syntax error in deleteProjectIfExists (t.Error(t, err) -> t.Error(err))
- Each test run gets fresh Artifactory instance, eliminating project accumulation
- Resolves 'Cannot create project, Max number of projects is reached' errors

Changes:
- Use jfrog/.github/actions/install-local-artifactory@main
- Connect to http://127.0.0.1:8082 instead of secrets.PLATFORM_URL
- Use auto-generated JFROG_TESTS_LOCAL_ACCESS_TOKEN
- Add macOS skip logic (JGC-413)
- Explicit OS version matrix for consistency

Benefits:
- No shared state between test runs
- No manual cleanup required
- Better test isolation
- Consistent with other test workflows
@agrasth agrasth added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Dec 9, 2025
Added condition to skip lifecycle tests based on TestLifecycle flag.
@agrasth agrasth added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Dec 9, 2025
@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


@fluxxBot fluxxBot added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Dec 9, 2025
@agrasth agrasth closed this Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants