Skip to content

Commit

Permalink
Pin Azure deps until GH workflow install the same version and fix mypy (
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannt0 committed Jan 7, 2022
1 parent 922cec6 commit 37a9de7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libcloudforensics/providers/aws/internal/ebs.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def CreateVolumeFromSnapshot(
'VolumeType': volume_type
}
if kms_key_id:
create_volume_args['Encrypted'] = True
create_volume_args['Encrypted'] = True # type: ignore
create_volume_args['KmsKeyId'] = kms_key_id
if volume_type == 'io1':
# If using the io1 volume type, we must specify Iops, see
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
azure-common
azure-core
azure-identity
azure-mgmt-compute
azure-mgmt-compute==23.1.0
azure-mgmt-monitor
azure-mgmt-network
azure-mgmt-resource
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/azure/internal/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def testGetDisk(self, mock_list_disks):
self.assertEqual('fake-region', disk.region)
self.assertEqual(['fake-zone'], disk.zones)

@mock.patch('azure.mgmt.compute.v2021_08_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@mock.patch('azure.mgmt.compute.v2021_04_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@typing.no_type_check
def testCreateDiskFromSnapshot(self, mock_create_disk):
"""Test that a disk can be created from a snapshot."""
Expand Down Expand Up @@ -182,7 +182,7 @@ def testCreateDiskFromSnapshot(self, mock_create_disk):
@mock.patch('azure.storage.blob._blob_service_client.BlobServiceClient.__init__')
@mock.patch('libcloudforensics.providers.azure.internal.storage.AZStorage.DeleteStorageAccount')
@mock.patch('libcloudforensics.providers.azure.internal.storage.AZStorage.CreateStorageAccount')
@mock.patch('azure.mgmt.compute.v2021_08_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@mock.patch('azure.mgmt.compute.v2021_04_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@typing.no_type_check
def testCreateDiskFromSnapshotUri(self,
mock_create_disk,
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/azure/test_forensics.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AZForensicsTest(unittest.TestCase):
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetDisk')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeVirtualMachine.GetBootDisk')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetInstance')
@mock.patch('azure.mgmt.compute.v2021_08_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@mock.patch('azure.mgmt.compute.v2021_04_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@typing.no_type_check
def testCreateDiskCopy1(self,
mock_create_disk,
Expand Down Expand Up @@ -88,7 +88,7 @@ def testCreateDiskCopy1(self,
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetDisk')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeVirtualMachine.GetBootDisk')
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetInstance')
@mock.patch('azure.mgmt.compute.v2021_08_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@mock.patch('azure.mgmt.compute.v2021_04_01.operations._disks_operations.DisksOperations.begin_create_or_update')
@typing.no_type_check
def testCreateDiskCopy2(self,
mock_create_disk,
Expand Down
2 changes: 1 addition & 1 deletion tools/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
def AddParser(
provider: str,
# pylint: disable=protected-access
provider_parser: argparse._SubParsersAction,
provider_parser: argparse._SubParsersAction, # type: ignore
# pylint: enable=protected-access
func: str,
func_helper: str,
Expand Down

0 comments on commit 37a9de7

Please sign in to comment.