Skip to content

Commit

Permalink
ncm-spma: apt: Test both states of gpgcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Jul 25, 2023
1 parent 6091a7a commit c31fd58
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
23 changes: 20 additions & 3 deletions ncm-spma/src/main/resources/tests/profiles/apt-sources.pan
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,41 @@ include "components/spma/apt/schema";
'/software/packages' = dict();

prefix '/software/repositories/0';
'name' = 'a_source';
'name' = 'standard_source';
'owner' = 'localuser@localdomain';
'enabled' = true;
'gpgcheck' = true;
'protocols' = list(
dict(
'name', 'http',
'url', 'http://first.example.com/path/to/stuff trusty main',
),
dict(
'name', 'http',
'url', 'http://another.example.org/another/path trusty main',
'url', 'https://second.example.com/path/to/things trusty main',
),
);
'includepkgs' = list(
'foo',
'bar',
);
'excludepkgs' = list(
'baz',
);

prefix '/software/repositories/1';
'name' = 'trusted_source';
'owner' = 'localuser@localdomain';
'enabled' = true;
'gpgcheck' = false;
'protocols' = list(
dict(
'name', 'http',
'url', 'http://another.example.org/another/path trusty main',
),
);
'includepkgs' = list(
'bar',
);
'excludepkgs' = list(
'quux',
);
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Check that basic apt sources are rendered correctly
---
//software
renderpath=/software
rendermodule=apt/source
contentspath=/software/repositories/0
---
^# Name: a_source$
^# Name: standard_source$
^# Owner: localuser@localdomain$
^# Protocol type: http$
^deb \[trusted=yes\] http://first.example.com/path/to/stuff trusty main$
^deb http://first.example.com/path/to/stuff trusty main$
^# Protocol type: http$
^deb \[trusted=yes\] http://another.example.org/another/path trusty main$
^deb https://second.example.com/path/to/things trusty main$
10 changes: 10 additions & 0 deletions ncm-spma/src/main/resources/tests/regexps/apt-sources/trusted
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Check that trusted (gpgcheck=false) apt sources are rendered correctly
---
renderpath=/software
rendermodule=apt/source
contentspath=/software/repositories/1
---
^# Name: trusted_source$
^# Owner: localuser@localdomain$
^# Protocol type: http$
^deb \[trusted=yes\] http://another.example.org/another/path trusty main

0 comments on commit c31fd58

Please sign in to comment.