Exemple #1
0
class CPEsPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'cpe'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
    test_counts = make_test_counts(
        entity_name, selene_name=selene_name, gmp_cmd=gmp_cmd, no_plural=True
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetCPEs,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name, gmp_cmd=gmp_cmd, selene_name=selene_name, no_plural=True
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
Exemple #2
0
class HostsPaginationTestCase(SeleneTestCase):
    gmp_cmd = 'get_hosts'
    gmp_name = 'asset'
    selene_name = 'host'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name)
    test_counts = make_test_counts(gmp_name=gmp_name,
                                   gmp_cmd=gmp_cmd,
                                   selene_name=selene_name)
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        query=GetHosts,
    )
    test_edges = make_test_edges(gmp_name=gmp_name,
                                 gmp_cmd=gmp_cmd,
                                 selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
Exemple #3
0
class OperatingSystemsPaginationTestCase(SeleneTestCase):
    gmp_cmd = 'get_operating_systems'
    gmp_name = 'asset'
    selene_name = 'operatingSystem'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_counts = make_test_counts(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        query=GetOperatingSystems,
    )
    test_edges = make_test_edges(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
Exemple #4
0
class AuditsPaginationTestCase(SeleneTestCase):
    gmp_name = 'task'
    selene_name = 'audit'
    gmp_cmd = 'get_audits'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
    test_counts = make_test_counts(
        gmp_name=gmp_name, selene_name=selene_name, gmp_cmd=gmp_cmd
    )
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetAudits,
    )
    test_edges = make_test_edges(
        gmp_name=gmp_name, selene_name=selene_name, gmp_cmd=gmp_cmd
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
class SchedulesPaginationTestCase(SeleneTestCase):
    gmp_name = 'schedule'
    test_pagination_with_after_and_first = make_test_after_first(gmp_name)
    test_counts = make_test_counts(gmp_name)
    test_page_info = make_test_page_info(gmp_name, query=GetSchedules)
    test_pagination_with_before_and_last = make_test_before_last(gmp_name)
    test_edges = make_test_edges(gmp_name)
    test_after_first_before_last = make_test_after_first_before_last(gmp_name)
Exemple #6
0
class ResultsPaginationTestCase(SeleneTestCase):
    entity_name = 'result'
    test_pagination_with_after_and_first = make_test_after_first(entity_name)
    test_counts = make_test_counts(entity_name)
    test_page_info = make_test_page_info(entity_name, query=GetResults)
    test_pagination_with_before_and_last = make_test_before_last(entity_name)
    test_edges = make_test_edges(entity_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name)
class TicketsPaginationTestCase(SeleneTestCase):
    entity_name = 'ticket'
    edge_name = 'remediationticket'
    test_pagination_with_after_and_first = make_test_after_first(entity_name)
    test_counts = make_test_counts(entity_name)
    test_get_page_info = make_test_page_info(entity_name, query=GetTickets)
    test_edges = make_test_edges(entity_name, edge_name=edge_name)
    test_pagination_with_before_and_last = make_test_before_last(entity_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name)
Exemple #8
0
class TasksPaginationTestCase(SeleneTestCase):
    entity_name = 'task'
    test_pagination_with_after_and_first = make_test_after_first(entity_name,
                                                                 details=True)
    test_counts = make_test_counts(entity_name)
    test_page_info = make_test_page_info(entity_name, query=GetTasks)
    test_edges = make_test_edges(entity_name)
    test_pagination_with_before_and_last = make_test_before_last(entity_name,
                                                                 details=True)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, details=True)
Exemple #9
0
class AlertsPaginationTestCase(SeleneTestCase):
    gmp_name = 'alert'
    test_pagination_with_after_and_first = make_test_after_first(gmp_name,
                                                                 tasks=True)
    test_counts = make_test_counts(gmp_name)
    test_page_info = make_test_page_info(gmp_name, query=GetAlerts)
    test_pagination_with_before_and_last = make_test_before_last(gmp_name,
                                                                 tasks=True)
    test_edges = make_test_edges(gmp_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, tasks=True)
Exemple #10
0
class CertBundAdvisoriessPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'certbundadvisory'
    plural_selene_name = 'certBundAdvisories'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
    test_counts = make_test_counts(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetCertBundAdvisories,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
class OvalDefinitionsPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'ovalDefinition'
    plural_selene_name = 'ovalDefinitions'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
    test_counts = make_test_counts(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        no_plural=True,
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        query=GetOvalDefinitions,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
class TLSCertificatesPaginationTestCase(SeleneTestCase):
    entity_name = 'tls_certificate'
    selene_name = 'tlsCertificate'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name)
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(entity_name,
                                         selene_name=selene_name,
                                         query=GetTLSCertificates)
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name)
class ScanConfigsPaginationTestCase(SeleneTestCase):
    gmp_name = 'config'
    selene_name = 'scanConfig'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name, details=False)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetScanConfigs)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name, details=False)
    test_edges = make_test_edges(gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name, details=False)
Exemple #14
0
class HostsPaginationTestCase(SeleneTestCase):
    entity_name = 'asset'
    selene_name = 'host'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(entity_name,
                                         selene_name=selene_name,
                                         query=GetHosts)
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
Exemple #15
0
class PortListsPaginationTestCase(SeleneTestCase):
    gmp_name = 'port_list'
    selene_name = 'portList'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name, details=True)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetPortLists)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name, details=True)
    test_edges = make_test_edges(gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name, details=True)
Exemple #16
0
class HostsPaginationTestCase(SeleneTestCase):
    entity_name = 'filter'
    selene_name = 'filter'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(
        entity_name, selene_name=selene_name, query=GetFilters
    )
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
Exemple #17
0
class PoliciesPaginationTestCase(SeleneTestCase):
    gmp_name = 'config'
    gmp_cmd = 'get_policies'
    selene_name = 'policy'
    plural_name = 'policies'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
    test_counts = make_test_counts(
        gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_name,
    )
    test_page_info = make_test_page_info(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        query=GetPolicies,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
    test_edges = make_test_edges(
        gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
class VulnerabilitiesPaginationTestCase(SeleneTestCase):
    gmp_name = 'vuln'
    selene_name = 'vulnerability'
    plural_selene_name = 'vulnerabilities'
    gmp_cmd = 'get_vulnerabilities'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_counts = make_test_counts(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_page_info = make_test_page_info(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        query=GetVulnerabilities,
    )
    test_edges = make_test_edges(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
class OperatingSystemsPaginationTestCase(SeleneTestCase):
    entity_name = 'asset'
    selene_name = 'operatingSystem'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(
        entity_name, selene_name=selene_name, query=GetOperatingSystems
    )
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )