-
Notifications
You must be signed in to change notification settings - Fork 5
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 #566 from ARGOeu/devel
## [3.4.9] - 2023-08-03
- Loading branch information
Showing
23 changed files
with
3,319 additions
and
2,468 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
source /etc/profile.d/venv_poem.sh; | ||
workon poem; | ||
|
||
export PYTHONIOENCODING=utf-8 | ||
|
||
tenants=($(poem-manage poem_list_tenants)); | ||
|
||
for tenant in "${tenants[@]}" | ||
do | ||
if [[ $tenant == "all" ]] | ||
then | ||
schema="public" | ||
filename=$VIRTUAL_ENV/var/db_backups/poem-db-backup-public_$(date "+%Y-%m-%d").json | ||
else | ||
schema=$(echo "$tenant" | awk '{print tolower($0)}') | ||
filename=$VIRTUAL_ENV/var/db_backups/poem-db-backup-$schema\_$(date "+%Y-%m-%d").json | ||
fi | ||
eval poem-db -p -n "$schema" -f "$filename" | ||
done |
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 |
---|---|---|
@@ -1 +1 @@ | ||
30 3 * * * postgres source /etc/profile.d/venv_poem.sh; workon poem; export LD_LIBRARY_PATH=/opt/rh/rh-postgresql10/root/usr/lib64:$LD_LIBRARY_PATH; export PATH=/opt/rh/rh-postgresql10/root/usr/bin:$PATH; pg_dump postgres > $VIRTUAL_ENV/var/db_backups/poem-db-backup-$(date "+\%Y-\%m-\%d") | ||
30 3 * * * root /home/pyvenv/poem/bin/poem-backup |
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 |
---|---|---|
|
@@ -4313,7 +4313,8 @@ def setUp(self) -> None: | |
command="/usr/libexec/argo/probes/test/test-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
contact="[email protected]", | ||
status=status_testing | ||
status=status_testing, | ||
service_type="test.service.type" | ||
) | ||
self.candidate2 = poem_models.ProbeCandidate.objects.create( | ||
name="some-probe", | ||
|
@@ -4350,6 +4351,7 @@ def test_get_probe_candidates_list_superuser(self): | |
"-H <hostname> -t <timeout> --test --flag1 --flag2", | ||
"contact": "[email protected]", | ||
"status": "submitted", | ||
"service_type": "", | ||
"created": | ||
self.candidate2.created.strftime("%Y-%m-%d %H:%M:%S"), | ||
"last_update": self.candidate2.last_update.strftime( | ||
|
@@ -4367,6 +4369,7 @@ def test_get_probe_candidates_list_superuser(self): | |
" -t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "testing", | ||
"service_type": "test.service.type", | ||
"created": | ||
self.candidate1.created.strftime("%Y-%m-%d %H:%M:%S"), | ||
"last_update": self.candidate1.last_update.strftime( | ||
|
@@ -4403,6 +4406,7 @@ def test_get_probe_candidate_by_id_superuser(self): | |
" -t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "testing", | ||
"service_type": "test.service.type", | ||
"created": | ||
self.candidate1.created.strftime("%Y-%m-%d %H:%M:%S"), | ||
"last_update": | ||
|
@@ -4450,7 +4454,8 @@ def test_put_probe_candidate_superuser(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "deployed" | ||
"status": "deployed", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
@@ -4481,6 +4486,7 @@ def test_put_probe_candidate_superuser(self): | |
) | ||
self.assertEqual(candidate.contact, "[email protected]") | ||
self.assertEqual(candidate.status.name, "deployed") | ||
self.assertEqual(candidate.service_type, "some.service.type") | ||
|
||
def test_put_probe_candidate_regular_user(self): | ||
data = { | ||
|
@@ -4493,7 +4499,8 @@ def test_put_probe_candidate_regular_user(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "deployed" | ||
"status": "deployed", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
@@ -4528,6 +4535,7 @@ def test_put_probe_candidate_regular_user(self): | |
) | ||
self.assertEqual(candidate.contact, "[email protected]") | ||
self.assertEqual(candidate.status.name, "testing") | ||
self.assertEqual(candidate.service_type, "test.service.type") | ||
|
||
def test_put_probe_candidate_nonexisting_id_superuser(self): | ||
data = { | ||
|
@@ -4540,7 +4548,8 @@ def test_put_probe_candidate_nonexisting_id_superuser(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "deployed" | ||
"status": "deployed", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
@@ -4560,7 +4569,8 @@ def test_put_probe_candidate_nonexisting_id_regular_user(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "deployed" | ||
"status": "deployed", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
@@ -4583,7 +4593,8 @@ def test_put_probe_candidate_nonexisting_status_superuser(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "nonexisting" | ||
"status": "nonexisting", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
@@ -4605,7 +4616,8 @@ def test_put_probe_candidate_nonexisting_status_regular_user(self): | |
"command": "/usr/libexec/argo/probes/test/new-probe -H <hostname> " | ||
"-t <timeout> --test", | ||
"contact": "[email protected]", | ||
"status": "nonexisting" | ||
"status": "nonexisting", | ||
"service_type": "some.service.type" | ||
} | ||
content, content_type = encode_data(data) | ||
request = self.factory.put(self.url, content, content_type=content_type) | ||
|
Oops, something went wrong.