Work together on openQA tests

In order to be able to create new tests or to improve/modify existing tests, you'll need to have your own fork of the test repository. If you are a Debian Developer, you can skip the forking step.

These instructions assume that you are using a virtual machine, with a configuration as described here.

Prepare the git workspace

  1. The key, that is used locally for Ansible, can be re-purposed for use on Salsa too (user=user)

    cat ~/.ssh/id_ed25519.pub
    
  2. Paste the output of the last command in 'SSH Keys' for Salsa (https://salsa.debian.org/-/user_settings/ssh_keys)

  3. Create a fork in Salsa

  4. Install additional packages (user=root)

    apt-get install --yes make perltidy # For the coding convention
    apt-get install --yes tigervnc-viewer # For monitoring jobs
    
  5. Add your user to the group that owns the git workspace (user=root)

    usermod --append --groups geekotest user
    
  6. Activate the new group membership -> logout and login again

  7. Add your fork to the local git workspace (user=user)

    cd /var/lib/openqa/share/tests/debian
    git config --global --add safe.directory /var/lib/openqa/share/tests/debian
    SALSA_USERNAME=**enter your username for salsa here**
    git remote add mine git@salsa.debian.org:${SALSA_USERNAME}/openqa-tests-debian.git
    git fetch --all
    
  8. Tell git who you are (user=user)

    git config --global user.email "**you@example.com**"
    git config --global user.name "**Your Name**"
    

Work in the git workspace

  1. Work with git as usual to prepare the update (user=user)

    git checkout origin/debian
    git switch -c ${SALSA_USERNAME}/**featurename**
    git add **some_modified_file**
    
  2. Always apply the Perl coding convention before doing a commit (user=user)

    make tidy
    
  3. Publish your changes and create a merge request (user=user)

    git commit
    git push --set-upstream origin ${SALSA_USERNAME}/**featurename**
    
  4. Merge requests on Salsa are monitored, so your change will be reviewed and merged soon

Monitor a job and perform needle updates

  1. Browse to a running job on http://localhost

  2. Go to the tab 'Live View'

  3. Click on 'Developer Mode'

  4. Change 'Pause on screen mismatch' to 'assert_screen timeout'

  5. Click on 'Confirm to control this test'

  6. See also the documentation of upstream: Use of the web interface

Adjust the configuration

The configuration for the jobs are managed by Ansible. If you change the content of the configuration directory in the git workspace, test the changes locally (update with Ansible) before committing them.