diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 379b16bec..7e213caaa 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -20,4 +20,4 @@ jobs: - name: black uses: psf/black@stable with: - version: 22.6.0 + version: 22.8.0 diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index 563ded596..6183565e2 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -9,7 +9,38 @@ on: branches: - main jobs: - sanity: + sanity1: + name: Sanity tests with ansible-core==2.15.0 + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: ["3.9"] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Setup Docker + uses: docker-practice/actions-setup-docker@master + - name: Install ansible + run: | + pip install -r tests/integration/requirements.txt + - name: Build and install the collection + run: | + NAMESPACE=$(cat galaxy.yml | shyaml get-value namespace) + COLLECTION_NAME=$(cat galaxy.yml | shyaml get-value name) + VERSION=$(cat galaxy.yml | shyaml get-value version) + echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV + echo "COLLECTION_NAME=${COLLECTION_NAME}" >> $GITHUB_ENV + ansible-galaxy collection build --force + ansible-galaxy collection install ${NAMESPACE}-${COLLECTION_NAME}-${VERSION}.tar.gz --force + - name: Run tests + run: | + cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + ansible-test sanity --docker default --python ${{ matrix.python-version }} -v + sanity2: + name: Sanity tests with ansible-core==2.14.0 runs-on: ubuntu-20.04 strategy: matrix: diff --git a/plugins/module_utils/ndb/profiles/profiles.py b/plugins/module_utils/ndb/profiles/profiles.py index 8f0166560..1ae7797b2 100644 --- a/plugins/module_utils/ndb/profiles/profiles.py +++ b/plugins/module_utils/ndb/profiles/profiles.py @@ -109,6 +109,7 @@ def get_profiles(self, uuid=None, name=None, type=None): return resp def get_all_name_uuid_map(self): + query = None if self._type: query = {"type": self._type} diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index a380011ff..89699d2bd 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -1,9 +1,9 @@ pip~=21.3.1 ipaddress~=1.0.23 setuptools~=44.1.1 -ansible-core==2.14.0 +ansible-core==2.15.0 requests~=2.26.0 -black==21.7b0 +black==22.8.0 flake8==4.0.1 isort==5.9.3 coverage==6.5.0 diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py index bfc8adfbe..27bfe2450 100644 --- a/tests/unit/compat/builtins.py +++ b/tests/unit/compat/builtins.py @@ -27,7 +27,7 @@ # One unittest needs to import builtins via __import__() so we need to have # the string that represents it try: - import __builtin__ + import __builtin__ # pylint: disable=unused-import except ImportError: BUILTINS = "builtins" else: