Skip to content

Commit

Permalink
Merge branch 'main' into feat/2932
Browse files Browse the repository at this point in the history
  • Loading branch information
jamshale authored May 21, 2024
2 parents 72508a4 + 339cfe5 commit 63e5afb
Show file tree
Hide file tree
Showing 51 changed files with 460 additions and 12,934 deletions.
113 changes: 0 additions & 113 deletions .github/workflows/publish-indy.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/tests-indy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions aries_cloudagent/anoncreds/tests/test_holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
MOCK_PRES,
MOCK_PRES_REQ,
)
from aries_cloudagent.askar.profile import AskarProfile
from aries_cloudagent.askar.profile_anon import AskarAnoncredsProfile
from aries_cloudagent.core.in_memory.profile import (
InMemoryProfile,
InMemoryProfileSession,
)
from aries_cloudagent.indy.sdk.profile import IndySdkProfile
from aries_cloudagent.tests import mock
from aries_cloudagent.wallet.error import WalletNotFoundError

Expand Down Expand Up @@ -202,7 +202,7 @@ async def test_create_credential_request(
async def test_create_credential_request_with_non_anoncreds_profile_throws_x(self):
self.profile = InMemoryProfile.test_profile(
settings={"wallet-type": "askar"},
profile_class=IndySdkProfile,
profile_class=AskarProfile,
)
self.holder = test_module.AnonCredsHolder(self.profile)
with self.assertRaises(ValueError):
Expand Down
8 changes: 4 additions & 4 deletions aries_cloudagent/anoncreds/tests/test_issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
SchemaResult,
SchemaState,
)
from aries_cloudagent.askar.profile import (
AskarProfile,
)
from aries_cloudagent.askar.profile_anon import (
AskarAnoncredsProfile,
)
Expand All @@ -33,7 +36,6 @@
InMemoryProfile,
InMemoryProfileSession,
)
from aries_cloudagent.indy.sdk.profile import IndySdkProfile
from aries_cloudagent.tests import mock

from .. import issuer as test_module
Expand Down Expand Up @@ -135,9 +137,7 @@ async def test_init(self):
assert isinstance(self.issuer.profile, AskarAnoncredsProfile)

async def test_init_wrong_profile_type(self):
self.issuer._profile = InMemoryProfile.test_profile(
profile_class=IndySdkProfile
)
self.issuer._profile = InMemoryProfile.test_profile(profile_class=AskarProfile)
with self.assertRaises(ValueError):
self.issuer.profile

Expand Down
22 changes: 0 additions & 22 deletions aries_cloudagent/commands/tests/test_provision.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from aries_cloudagent.tests import mock
from unittest import IsolatedAsyncioTestCase

Expand All @@ -19,26 +17,6 @@ def test_bad_calls(self):
with self.assertRaises(SystemExit):
test_module.execute(["bad"])

@pytest.mark.indy
def test_provision_wallet(self):
test_seed = "testseed000000000000000000000001"
test_module.execute(
[
"--wallet-type",
"indy",
"--wallet-name",
"test_wallet",
"--wallet-key",
"key",
"--seed",
test_seed,
"--no-ledger",
"--endpoint",
"test_endpoint",
"--recreate-wallet",
]
)

async def test_provision_ledger_configured(self):
profile = mock.MagicMock(close=mock.CoroutineMock())
with mock.patch.object(
Expand Down
19 changes: 8 additions & 11 deletions aries_cloudagent/config/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def add_arguments(self, parser: ArgumentParser):
metavar="<storage-type>",
env_var="ACAPY_STORAGE_TYPE",
help=(
"DEPRECATED: This option is ignored. "
"Specifies the type of storage provider to use for the internal "
"storage engine. This storage interface is used to store internal "
"state. Supported internal storage types are 'basic' (memory) "
Expand Down Expand Up @@ -1575,10 +1576,10 @@ def add_arguments(self, parser: ArgumentParser):
default="basic",
env_var="ACAPY_WALLET_TYPE",
help=(
"Specifies the type of Indy wallet provider to use. "
"Specifies the type of wallet provider to use. "
"Supported internal storage types are 'basic' (memory), 'askar' "
"and 'askar-anoncreds'."
"The default (if not specified) is 'basic'. 'indy' is deprecated."
"The default (if not specified) is 'basic'."
),
)
parser.add_argument(
Expand All @@ -1602,10 +1603,7 @@ def add_arguments(self, parser: ArgumentParser):
help=(
"Specifies the storage configuration to use for the wallet. "
"This is required if you are for using 'postgres_storage' wallet "
'storage type. For example, \'{"url":"localhost:5432", '
'"wallet_scheme":"MultiWalletSingleTable"}\'. This '
"configuration maps to the indy sdk postgres plugin "
"(PostgresConfig)."
'storage type. For example, \'{"url":"localhost:5432"}\'.'
),
)
parser.add_argument(
Expand All @@ -1629,9 +1627,8 @@ def add_arguments(self, parser: ArgumentParser):
"This is required if you are for using 'postgres_storage' wallet "
'For example, \'{"account":"postgres","password": '
'"mysecretpassword","admin_account":"postgres", '
'"admin_password":"mysecretpassword"}\'. This configuration maps '
"to the indy sdk postgres plugin (PostgresCredentials). NOTE: "
"admin_user must have the CREATEDB role or else initialization "
'"admin_password":"mysecretpassword"}\'.'
"NOTE: admin_user must have the CREATEDB role or else initialization "
"will fail."
),
)
Expand Down Expand Up @@ -1685,7 +1682,7 @@ def get_settings(self, args: Namespace) -> dict:
if args.recreate_wallet:
settings["wallet.recreate"] = True
# check required settings for persistent wallets
if settings["wallet.type"] in ["indy", "askar", "askar-anoncreds"]:
if settings["wallet.type"] in ["askar", "askar-anoncreds"]:
# requires name, key
if not args.wallet_name or not args.wallet_key:
raise ArgsParseError(
Expand All @@ -1700,7 +1697,7 @@ def get_settings(self, args: Namespace) -> dict:
if not args.wallet_storage_config or not args.wallet_storage_creds:
raise ArgsParseError(
"Parameters --wallet-storage-config and --wallet-storage-creds "
"must be provided for indy postgres wallets"
"must be provided for postgres wallets"
)
return settings

Expand Down
13 changes: 0 additions & 13 deletions aries_cloudagent/config/default_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ..resolver.did_resolver import DIDResolver
from ..tails.base import BaseTailsServer
from ..transport.wire_format import BaseWireFormat
from ..utils.dependencies import is_indy_sdk_module_installed
from ..utils.stats import Collector
from ..wallet.default_verification_key_strategy import (
BaseVerificationKeyStrategy,
Expand Down Expand Up @@ -70,18 +69,6 @@ async def build_context(self) -> InjectionContext:
async def bind_providers(self, context: InjectionContext):
"""Bind various class providers."""

# Bind global indy pool provider to be able to share pools between wallets
# It is important the ledger pool provider is available in the base context
# so it can be shared by all wallet instances. If we set it in the indy sdk
# profile provider it could mean other wallets won't have access to the provider
if is_indy_sdk_module_installed():
from ..ledger.indy import IndySdkLedgerPool, IndySdkLedgerPoolProvider

context.injector.bind_provider(
IndySdkLedgerPool,
CachedProvider(IndySdkLedgerPoolProvider(), ("ledger.pool_name",)),
)

context.injector.bind_provider(ProfileManager, ProfileManagerProvider())

wallet_type = self.settings.get("wallet.type")
Expand Down
11 changes: 0 additions & 11 deletions aries_cloudagent/core/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ async def setup(self):
self.root_profile,
),
)
elif (
self.root_profile.BACKEND_NAME == "indy"
and ledger.BACKEND_NAME == "indy"
):
context.injector.bind_provider(
IndyVerifier,
ClassProvider(
"aries_cloudagent.indy.sdk.verifier.IndySdkVerifier",
self.root_profile,
),
)
else:
raise MultipleLedgerManagerError(
"Multiledger is supported only for Indy SDK or Askar "
Expand Down
1 change: 0 additions & 1 deletion aries_cloudagent/core/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ class ProfileManagerProvider(BaseProvider):
"askar": "aries_cloudagent.askar.profile.AskarProfileManager",
"askar-anoncreds": "aries_cloudagent.askar.profile_anon.AskarAnonProfileManager",
"in_memory": "aries_cloudagent.core.in_memory.InMemoryProfileManager",
"indy": "aries_cloudagent.indy.sdk.profile.IndySdkProfileManager",
}

def __init__(self):
Expand Down
5 changes: 1 addition & 4 deletions aries_cloudagent/indy/models/tests/test_pres_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from time import time
from unittest import TestCase

from unittest import IsolatedAsyncioTestCase
from aries_cloudagent.tests import mock

from ....core.in_memory import InMemoryProfile
Expand Down Expand Up @@ -350,8 +349,7 @@ def test_eq(self):
assert pred_spec_a != pred_spec_b


@pytest.mark.indy
class TestIndyPresPreviewAsync(IsolatedAsyncioTestCase):
class TestIndyPresPreviewAsync:
"""Presentation preview tests"""

@pytest.mark.asyncio
Expand Down Expand Up @@ -503,7 +501,6 @@ async def test_satisfaction(self):
assert not attr_spec.satisfies(pred_spec)


@pytest.mark.indy
class TestIndyPresPreview(TestCase):
"""Presentation preview tests"""

Expand Down
Empty file.
Loading

0 comments on commit 63e5afb

Please sign in to comment.