def call_general(test, rg): setup_general(test, rg) step_device_create(test, rg, checks=[ test.check("location", "eastus", case_sensitive=False), test.check("sku.name", "Edge", case_sensitive=False), test.check("sku.tier", "Standard", case_sensitive=False), test.check("name", "{myDevice}", case_sensitive=False), ]) step_device_show(test, rg, checks=[ test.check("location", "eastus", case_sensitive=False), test.check("sku.name", "Edge", case_sensitive=False), test.check("sku.tier", "Standard", case_sensitive=False), test.check("name", "{myDevice}", case_sensitive=False), ]) step_device_list(test, rg, checks=[ test.check('length(@)', 1), ]) step_device_list2(test, rg, checks=[ JMESPathCheckGreaterThan('length(@)', 0), ]) step_device_update(test, rg, checks=[ test.check("location", "eastus", case_sensitive=False), test.check("sku.name", "Edge", case_sensitive=False), test.check("sku.tier", "Standard", case_sensitive=False), test.check("name", "{myDevice}", case_sensitive=False), test.check("tags.Key1", "value1", case_sensitive=False), test.check("tags.Key2", "value2", case_sensitive=False), ]) step_device_show(test, rg, checks=[ test.check("location", "eastus", case_sensitive=False), test.check("sku.name", "Edge", case_sensitive=False), test.check("sku.tier", "Standard", case_sensitive=False), test.check("name", "{myDevice}", case_sensitive=False), ]) step_device_delete(test, rg, checks=[]) step_device_list(test, rg, checks=[ test.check('length(@)', 0), ]) cleanup_general(test, rg)
def greater_than(self, query, expected_results): from azure.cli.testsdk.checkers import JMESPathCheckGreaterThan query = self._apply_kwargs(query) expected_results = self._apply_kwargs(expected_results) return JMESPathCheckGreaterThan(query, expected_results)
def call_scenario(test, rg): setup_scenario(test, rg) step_list_sku(test, rg, checks=[JMESPathCheckGreaterThan('length(@)', 0)]) cleanup_scenario(test, rg)