Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Fix path for installed apport-cli and fix test_run_crash_kernel on Azure #18

Merged
merged 3 commits into from Oct 7, 2022

Commits on Oct 6, 2022

  1. tests: Fix path for installed apport-cli

    Running the CLI UI tests against the install Apport fails:
    
    ```
    Traceback (most recent call last):
    [...]
      File "tests/integration/test_ui_cli.py", line 25, in <module>
        apport_cli = import_module_from_file(apport_cli_path)
      File "tests/helper.py", line 48, in import_module_from_file
        spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 879, in exec_module
      File "<frozen importlib._bootstrap_external>", line 1016, in get_code
      File "<frozen importlib._bootstrap_external>", line 1073, in get_data
    FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/apport/apport-cli'
    ```
    
    The CLI is installed in `/usr/bin/apport-cli`.
    
    Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
    bdrung committed Oct 6, 2022
    Copy the full SHA
    c406cda View commit details
    Browse the repository at this point in the history
  2. tests: Fix test_run_crash_kernel on Azure

    The UI integration test case `test_run_crash_kernel` fails on Azure:
    
    ```
    >       self.assertEqual(
                self.ui.opened_url,
                "http://%s.bugs.example.com/%i"
                % (src_pkg, self.ui.crashdb.latest_id()),
            )
    E       AssertionError: 'http://linux-signed-azure.bugs.example.com/5' != 'http://linux-signed.bugs.example.com/5'
    E       - http://linux-signed-azure.bugs.example.com/5
    E       ?                    ------
    E       + http://linux-signed.bugs.example.com/5
    
    tests/integration/test_ui.py:1574: AssertionError
    ```
    
    The kernel source package is named `linux-signed-azure` on Azure.
    
    Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
    bdrung committed Oct 6, 2022
    Copy the full SHA
    459baef View commit details
    Browse the repository at this point in the history
  3. CI: Run unit and integration tests against installed system

    Ubuntu's autopkgtest runs the unit and integration tests against the
    installed system. Test this scenario in the CI as well.
    
    Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
    bdrung committed Oct 6, 2022
    Copy the full SHA
    4fa4c8c View commit details
    Browse the repository at this point in the history