-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2233 from alan-turing-institute/internet
Add internet
- Loading branch information
Showing
8 changed files
with
92 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,11 @@ | |
ConfigSubsectionRemoteDesktopOpts, | ||
ConfigSubsectionStorageQuotaGB, | ||
) | ||
from data_safe_haven.types import DatabaseSystem, SoftwarePackageCategory | ||
from data_safe_haven.types import ( | ||
AzureServiceTag, | ||
DatabaseSystem, | ||
SoftwarePackageCategory, | ||
) | ||
|
||
|
||
class TestConfigSectionAzure: | ||
|
@@ -184,6 +188,24 @@ def test_ip_overlap_research_user(self): | |
research_user_ip_addresses=["1.2.3.4", "1.2.3.4"], | ||
) | ||
|
||
def test_research_user_tag_internet( | ||
self, | ||
config_subsection_remote_desktop: ConfigSubsectionRemoteDesktopOpts, | ||
config_subsection_storage_quota_gb: ConfigSubsectionStorageQuotaGB, | ||
): | ||
sre_config = ConfigSectionSRE( | ||
admin_email_address="[email protected]", | ||
remote_desktop=config_subsection_remote_desktop, | ||
storage_quota_gb=config_subsection_storage_quota_gb, | ||
research_user_ip_addresses="Internet", | ||
) | ||
assert isinstance(sre_config.research_user_ip_addresses, AzureServiceTag) | ||
assert sre_config.research_user_ip_addresses == "Internet" | ||
|
||
def test_research_user_tag_invalid(self): | ||
with pytest.raises(ValueError, match="Input should be 'Internet'"): | ||
ConfigSectionSRE(research_user_ip_addresses="Not a tag") | ||
|
||
@pytest.mark.parametrize( | ||
"addresses", | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters