2022-08-05 12:03:38 +00:00
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-03-09 09:11:07 +00:00
|
|
|
from __future__ import (absolute_import, division, print_function)
|
2020-06-24 19:50:36 +00:00
|
|
|
__metaclass__ = type
|
2020-03-09 09:11:07 +00:00
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
2022-11-02 20:42:29 +00:00
|
|
|
from ansible_collections.community.general.plugins.modules import linode
|
2020-03-31 08:42:38 +00:00
|
|
|
from ansible_collections.community.general.tests.unit.plugins.modules.utils import set_module_args
|
2020-03-09 09:11:07 +00:00
|
|
|
|
2023-02-12 20:05:08 +00:00
|
|
|
from .linode_conftest import api_key, auth # noqa: F401, pylint: disable=unused-import
|
2022-10-26 05:32:00 +00:00
|
|
|
|
2020-03-09 09:11:07 +00:00
|
|
|
if not linode.HAS_LINODE:
|
|
|
|
pytestmark = pytest.mark.skip('test_linode.py requires the `linode-python` module')
|
|
|
|
|
|
|
|
|
|
|
|
def test_name_is_a_required_parameter(api_key, auth):
|
|
|
|
with pytest.raises(SystemExit):
|
|
|
|
set_module_args({})
|
|
|
|
linode.main()
|