Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
Signed-off-by: Brentley Jones <github@brentleyjones.com>
  • Loading branch information
brentleyjones committed Sep 19, 2024
1 parent 96fd279 commit 61e2828
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_sign_bundle_with_manifest_codesign_invocations(self, mock_codesign):
dossier_directory_path='/tmp/dossier/',
codesign_path='/usr/bin/fake_codesign',
signing_keychain=_ADDITIONAL_SIGNING_KEYCHAIN,
certificates_directory_path='/tmp/certs/',
override_codesign_identity='-',
allowed_entitlements=None)

Expand Down Expand Up @@ -157,6 +158,7 @@ def test_sign_adhoc_simple_bundle_with_manifest_codesign_invocations(
dossier_directory_path='/tmp/dossier/',
codesign_path='/usr/bin/fake_codesign',
signing_keychain=_ADDITIONAL_SIGNING_KEYCHAIN,
certificates_directory_path='/tmp/certs/',
override_codesign_identity='-',
allowed_entitlements=None)
self.assertEqual(mock_codesign.call_count, 1)
Expand All @@ -183,6 +185,7 @@ def test_sign_bundle_with_allowed_entitlements(
dossier_directory_path='/tmp/dossier/',
codesign_path='/usr/bin/fake_codesign',
signing_keychain=_ADDITIONAL_SIGNING_KEYCHAIN,
certificates_directory_path='/tmp/certs/',
override_codesign_identity='-',
allowed_entitlements=['test-an-entitlement'])

Expand Down Expand Up @@ -258,6 +261,7 @@ def test_sign_bundle_with_manifest_raises_identity_infer_error(
manifest=fake_manifest,
dossier_directory_path='/tmp/dossier/',
signing_keychain=_ADDITIONAL_SIGNING_KEYCHAIN,
certificates_directory_path='/tmp/certs/',
codesign_path='/usr/bin/fake_codesign',
allowed_entitlements=None)

Expand All @@ -272,6 +276,7 @@ def test_sign_embedded_bundles_with_manifest(self, mock_sign_bundle):
codesign_path='/usr/bin/fake_codesign',
allowed_entitlements=None,
signing_keychain=_ADDITIONAL_SIGNING_KEYCHAIN,
certificates_directory_path='/tmp/certs/',
codesign_identity='-',
executor=executor)
dossier_codesigning_reader._wait_signing_futures(futures)
Expand All @@ -282,6 +287,7 @@ def test_sign_embedded_bundles_with_manifest(self, mock_sign_bundle):
'/usr/bin/fake_codesign',
None,
_ADDITIONAL_SIGNING_KEYCHAIN,
'/tmp/certs/',
'-',
executor,
)
Expand Down Expand Up @@ -446,6 +452,7 @@ def test_app_bundle_inputs(
tmp_fake_codesign.name,
None,
_ADDITIONAL_SIGNING_KEYCHAIN,
None,
)

@mock.patch.object(dossier_codesigning_reader, '_package_ipa')
Expand Down Expand Up @@ -495,6 +502,7 @@ def test_ipa_inputs(
tmp_fake_codesign.name,
None,
_ADDITIONAL_SIGNING_KEYCHAIN,
None,
)
mock_package.assert_called_once()

Expand Down Expand Up @@ -543,6 +551,7 @@ def test_combined_zip_inputs(
tmp_fake_codesign.name,
None,
_ADDITIONAL_SIGNING_KEYCHAIN,
None,
)
mock_package.assert_called_once()

Expand Down

0 comments on commit 61e2828

Please sign in to comment.