tree: 1eeed765e79195d07b72b504195d77f8555859d9 [path history] [tgz]
  1. cipd/
  2. configs/
  3. devicemap/
  4. genfiles/
  5. proto/
  6. puppet/
  7. scripts/
  8. __init__.py
  9. config_expectations_test.py
  10. config_expectations_update.py
  11. config_test.py
  12. config_utils.py
  13. expand_capabilities.py
  14. Makefile
  15. puppet_cipd_pkg.yaml
  16. README.md
catatester/README.md

Updating the protos

Just run make and the generated protos will be updated.

If the protoc compiler is confused by the map type, you are probably running version of protoc < v3.0. You can check with protoc --version. See below for updating your protoc version.

Installing protoc v3 compiler

Grab protoc-3.2.0-linux-x86_64.zip release from https://github.com/google/protobuf/releases/tag/v3.2.0

Newer releases of protoc are not compatible with the current version of protobuf python package installed in requirements.txt at the time of this writing.

Extract bin/protoc from the release and copy it into /usr/bin/protoc. Give it execute permissions.

Check the new version with protoc --version.

Running unittests

This section covers the process for executing Python3 unittests located under this directory.

Configuring Virtualenv

  1. Download CQ package mirror.

    mkdir -p ~/envs/mirror/python_packages
    gsutil rsync \
        "gs://nest-build-dependencies/common/python_packages" \
        ~/envs/mirror/python_packages
    
  2. Create a new virtual environment.

    python3 -m venv ~/envs/cq_venv
    
  3. Upgrade common modules.

    ~/envs/cq_venv/bin/pip install \
        --no-index \
        --find-links=file:///<PATH_TO_HOME>/envs/mirror/python_packages \
        --upgrade pip wheel setuptools
    
  4. Install requirements.

    ~/envs/cq_venv/bin/pip install \
        --no-index \
        --find-links=file:///<PATH_TO_HOME>/envs/mirror/python_packages \
        -r <REPO_ROOT>/continuous-tests/cq/requirements_recipe3.txt
    
  5. Run tests.

    ~/envs/cq_venv/bin/python3 -m unittest discover \
        -s ~/gazoo_repo/continuous-tests/catatester \
        -p '*_test.py'