Skip to content

Commit

Permalink
Cleaned previous implementation of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fernando79513 committed Jan 22, 2024
1 parent 7dfd1d6 commit 4f63223
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 56 deletions.
3 changes: 1 addition & 2 deletions checkbox-ng/plainbox/impl/session/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,5 +1215,4 @@ def test_on_job_removed__via_state(self):
sig1 = self.assertSignalFired(self.ctx.on_unit_removed, self.job)
sig2 = self.assertSignalFired(self.ctx.state.on_unit_removed, self.job)
sig3 = self.assertSignalFired(self.ctx.state.on_job_removed, self.job)
self.assertSignalOrdering(sig1, sig2, sig3)
Manage
self.assertSignalOrdering(sig1, sig2, sig3)
36 changes: 0 additions & 36 deletions metabox/metabox/metabox-provider/bin/create_packaging.py

This file was deleted.

8 changes: 1 addition & 7 deletions metabox/metabox/metabox-provider/units/basic-jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,4 @@ plugin: shell
id: dependency_installation
command: dependency_installation.py
_summary: Verify that all required modules are installed
_description: Verify that all required modules are installed

plugin: shell
id: deb-packaging
command: create_packaging.py
_summary: Test the packaging meta data for a specific version
_description: Test the packaging meta data for a specific version
_description: Verify that all required modules are installed
17 changes: 6 additions & 11 deletions metabox/metabox/scenarios/packaging/deb_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from importlib.resources import read_text
from pathlib import Path

from metabox.core.scenario import Scenario
from metabox.core.actions import (
AssertRetCode,
Start,
Put,
AssertPrinted,
RunManage,
AssertInFile,
RunCmd,
)
from metabox.core.utils import tag
from . import units

provider_path = "/home/ubuntu/checkbox/metabox/metabox/metabox-provider"
packaging_pxu_path = f"{provider_path}/units/packaging.pxu"
substvar_path = f"{provider_path}/debian/metabox-provider.substvars"

pxu_path = Path(__file__).parent.joinpath("packaging.pxu")
with open(pxu_path, "r") as file:
packaging_pxu = file.read()


@tag("packaging")
class DebPackagingJammy(Scenario):
Expand All @@ -42,10 +42,9 @@ class DebPackagingJammy(Scenario):
"""

modes = ["local"]
# Run the scenario without starting a session.
start_session = False
config_override = {"local": {"releases": ["jammy"]}}
packaging_pxu = read_text(units, "packaging.pxu")

steps = [
Put(f"{provider_path}/units/packaging.pxu", packaging_pxu),
RunManage(args="packaging"),
Expand All @@ -65,8 +64,6 @@ class DebPackagingFocal(Scenario):
modes = ["local"]
start_session = False
config_override = {"local": {"releases": ["focal"]}}
packaging_pxu = read_text(units, "packaging.pxu")

steps = [
Put(f"{provider_path}/units/packaging.pxu", packaging_pxu),
RunManage(args="packaging"),
Expand All @@ -85,8 +82,6 @@ class DebPackagingBionic(Scenario):

modes = ["local"]
config_override = {"local": {"releases": ["bionic"]}}
packaging_pxu = read_text(units, "packaging.pxu")

steps = [
Put(f"{provider_path}/units/packaging.pxu", packaging_pxu),
RunManage(args="packaging"),
Expand Down
Empty file.

0 comments on commit 4f63223

Please sign in to comment.