generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update template * implement use_starttls config * fix example config * version bump * relocate ssl context creation
- Loading branch information
Showing
14 changed files
with
100 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ smtp_port: 587 | |
login_user: "[email protected]" | ||
login_password: test | ||
from_address: "[email protected]" | ||
use_starttls: false |
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 |
---|---|---|
|
@@ -22,3 +22,4 @@ service_instance_id: '1' | |
service_name: ns | ||
smtp_host: 127.0.0.1 | ||
smtp_port: 587 | ||
use_starttls: false |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2021 - 2023 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln | ||
# for the German Human Genome-Phenome Archive (GHGA) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
"""Scripts and utils used during development or in CI pipelines.""" |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright 2021 - 2023 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln | ||
# for the German Human Genome-Phenome Archive (GHGA) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
"""Run all update scripts that are present in the repository in the correct order""" | ||
|
||
try: | ||
from scripts.update_template_files import main as update_template | ||
except ImportError: | ||
pass | ||
else: | ||
print("Pulling in updates from template repository") | ||
update_template() | ||
|
||
try: | ||
from scripts.update_config_docs import main as update_config | ||
except ImportError: | ||
pass | ||
else: | ||
print("Updating config docs") | ||
update_config() | ||
|
||
try: | ||
from scripts.update_openapi_docs import main as update_openapi | ||
except ImportError: | ||
pass | ||
else: | ||
print("Updating OpenAPI docs") | ||
update_openapi() | ||
|
||
try: | ||
from scripts.update_readme import main as update_readme | ||
except ImportError: | ||
pass | ||
else: | ||
print("Updating README") | ||
update_readme() |
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 |
---|---|---|
|
@@ -47,4 +47,5 @@ def get_config( | |
smtp_port=get_free_port(), | ||
login_user="[email protected]", | ||
login_password="test123", | ||
use_starttls=False, | ||
) |
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 |
---|---|---|
|
@@ -24,4 +24,5 @@ smtp_host: 127.0.0.1 | |
smtp_port: 587 | ||
login_user: "[email protected]" | ||
login_password: test | ||
use_starttls: false | ||
from_address: "[email protected]" |
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 |
---|---|---|
|
@@ -79,7 +79,7 @@ async def test_transmission(notification_details): | |
config = get_config([SMTP_TEST_CONFIG]) | ||
notification = make_notification(notification_details) | ||
|
||
smtp_client = SmtpClient(config=config, debugging=True) | ||
smtp_client = SmtpClient(config=config) | ||
server = DummyServer(config=config) | ||
|
||
notifier = Notifier(config=config, smtp_client=smtp_client) | ||
|
@@ -103,7 +103,7 @@ async def test_failed_authentication(): | |
server.login = "[email protected]" | ||
server.password = "notCorrect" | ||
notification = make_notification(sample_notification) | ||
smtp_client = SmtpClient(config=config, debugging=True) | ||
smtp_client = SmtpClient(config=config) | ||
notifier = Notifier(config=config, smtp_client=smtp_client) | ||
expected_email = notifier._construct_email( | ||
notification=notification | ||
|