Skip to content

Commit

Permalink
Create a fake rosdistro index for better test isolation
Browse files Browse the repository at this point in the history
The tests currently require the rosdistro index to be reachable.
  • Loading branch information
cottsay committed Mar 22, 2024
1 parent f42ac2f commit c194aee
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import os

os.environ['ROSDISTRO_INDEX_URL'] = 'file://' + os.path.join(
os.path.dirname(os.path.abspath(__file__)),
'fake_rosdistro',
'index-v4.yaml',
)

user_email = '[email protected]'
user_name = 'Test User'

Expand Down
10 changes: 10 additions & 0 deletions test/fake_rosdistro/index-v4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
%YAML 1.1
---
distributions:
melodic:
distribution: [melodic/distribution.yaml]
distribution_status: end-of-life
distribution_type: ros1
python_version: 2
type: index
version: 4
10 changes: 10 additions & 0 deletions test/fake_rosdistro/melodic/distribution.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
%YAML 1.1
---
release_platforms:
debian:
- buster
ubuntu:
- bionic
repositories: []
type: distribution
version: 2

0 comments on commit c194aee

Please sign in to comment.