tests.test_db

DB specific tests

Module Contents

Functions

ginosession()

make sure db is bound etc

test_dbconfig_env(monkeypatch)

Test the env loading works without import side effects

test_dbconfig_defaults(docker_ip)

Check that the fixture set port and host correctly

test_person_crud(ginosession)

Test the db abstraction of persons and roles

test_enrollments_crud(ginosession)

Test the db abstraction enrollments

test_enrollmentpools_crud(ginosession)

Test the db abstraction enrollments and enrollmentpools

test_enrollmentpools_list(ginosession)

Test list methods

test_enrollments_list(ginosession)

Test list methods

test_seentokens_crud(ginosession)

Test the db abstraction for seen tokens

test_logincodes_crud(ginosession)

Test the db abstraction for login codes

test_person_with_cert(ginosession)

Test the cert creation with the classmethod (and revocation)

test_person_with_cert_cfsslfail(ginosession, monkeypatch)

Test the cert creation with the classmethod with CFSSL failure

test_person_with_cert_duplicatename(ginosession)

Test the cert creation with the classmethod but reserved callsign

test_pfx_parse(ginosession)

Test that the PFX file gets done

test_productcn_forbid(ginosession)

Test that trying to create enrollment or person with callsign that matches a product CN fails

Attributes

LOGGER

LOGGER[source]
async ginosession()[source]

make sure db is bound etc

Return type:

None

test_dbconfig_env(monkeypatch)[source]

Test the env loading works without import side effects

Parameters:

monkeypatch (pytest.MonkeyPatch)

Return type:

None

test_dbconfig_defaults(docker_ip)[source]

Check that the fixture set port and host correctly

Parameters:

docker_ip (str)

Return type:

None

async test_person_crud(ginosession)[source]

Test the db abstraction of persons and roles

Parameters:

ginosession (None)

Return type:

None

async test_enrollments_crud(ginosession)[source]

Test the db abstraction enrollments

Parameters:

ginosession (None)

Return type:

None

async test_enrollmentpools_crud(ginosession)[source]

Test the db abstraction enrollments and enrollmentpools

Parameters:

ginosession (None)

Return type:

None

async test_enrollmentpools_list(ginosession)[source]

Test list methods

Parameters:

ginosession (None)

Return type:

None

async test_enrollments_list(ginosession)[source]

Test list methods

Parameters:

ginosession (None)

Return type:

None

async test_seentokens_crud(ginosession)[source]

Test the db abstraction for seen tokens

Parameters:

ginosession (None)

Return type:

None

async test_logincodes_crud(ginosession)[source]

Test the db abstraction for login codes

Parameters:

ginosession (None)

Return type:

None

async test_person_with_cert(ginosession)[source]

Test the cert creation with the classmethod (and revocation)

Parameters:

ginosession (None)

Return type:

None

async test_person_with_cert_cfsslfail(ginosession, monkeypatch)[source]

Test the cert creation with the classmethod with CFSSL failure

Parameters:
  • ginosession (None)

  • monkeypatch (pytest.MonkeyPatch)

Return type:

None

async test_person_with_cert_duplicatename(ginosession)[source]

Test the cert creation with the classmethod but reserved callsign

Parameters:

ginosession (None)

Return type:

None

async test_pfx_parse(ginosession)[source]

Test that the PFX file gets done

Parameters:

ginosession (None)

Return type:

None

async test_productcn_forbid(ginosession)[source]

Test that trying to create enrollment or person with callsign that matches a product CN fails

Parameters:

ginosession (None)

Return type:

None