SUSE / rmt

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

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

Closed felixsch closed 6 months ago

felixsch commented 7 months ago

Description

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

The whole changeset is: [1/x] Prepare code sprint and implement repository type detection [2/x] Add debian mirroring support to RMT

Implementations in this PR:

The repository type is not yet used in any way and is only there for future use.

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

Thanks for reviewing this pull request!

If you have any question please do not hesitate to approach me! :rocket:

suse-tests-pass commented 6 months ago

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