SUSE / rmt

RPM repository mirroring tool and registration proxy for SUSE Customer Center.
Other
38 stars 45 forks source link

[1/x] Prepare code sprint and implement repository type detection #1066

Closed felixsch closed 8 months ago

felixsch commented 9 months ago

This is the revert of the revert of the original pull request

This PR is part of our code sprint: https://trello.com/c/hU27QHob/3134-rdeb-sprint-tracker

original pull request: https://github.com/SUSE/rmt/pull/1056 revert of the pull request: https://github.com/SUSE/rmt/pull/1061

The whole changeset is:

[1/5] Prepare code sprint and implement repository type detection [2/5] Add flat debian mirroring support to RMT [3/5] Refactor suma mirroring [4/5] Refactor repomd mirroring [5/5] Fixes and cleanup [6/6] Nested debian repository support

How to test this pull request:

Make sure mirroring is working as expected

$ bin/rmt-cli mirror
# Expect: mirroring to work normally

Test repository type detection

# Sync any of our test accounts or our RMT reference account
$ rails c
> debian = Repository.find_by(name: 'Debian-10-SUSE-Manager-Tools')
> repomd = Repository.find_by(name: 'SLE-Product-SLED15-SP6-Pool')
> debian_mirror = RMT::Mirror.new(repository: debian, logger: nil, base_dir: '/tmp')
> repomd_mirror = RMT::Mirror.new(repository: repomd, logger: nil, base_dir: '/tmp')

> repomd_mirror.detect_repository_type
# expect: to return :repomd

> debian_mirror.detect_repository_type
# expect: to return :debian

DO NOT MERGE UNTIL COMPLETELY READY

suse-tests-pass commented 8 months ago

Well Done! Your tests are still passing. https://ci.suse.de/job/scc-RMT-integration-tests/354752/console If the given link has expired,you can force a Prophet rerun by just deleting this comment. (Merged 71f4674ef39d2191219a59d573290dabf4e8fa96 into 024478b7c8a9b7c45d617377f2c472917220d603)