From 77f07b105e1db290827903546bf72cc380cc7ce8 Mon Sep 17 00:00:00 2001 From: benoit Date: Mon, 11 Jul 2022 12:32:20 +0200 Subject: [PATCH 1/3] Move vagrant to / --- CONTRIBUTING.md | 2 +- {test/vagrant => vagrant}/LICENSE | 0 {test/vagrant => vagrant}/Makefile | 0 {test/vagrant => vagrant}/README.md | 0 {test/vagrant => vagrant}/Vagrantfile | 0 {test/vagrant => vagrant}/grafana/cluster_status_cluster1.json | 0 {test/vagrant => vagrant}/grafana/node_status_p1.json | 0 {test/vagrant => vagrant}/grafana/node_status_p2.json | 0 {test/vagrant => vagrant}/provision/check_patroni.bash | 0 {test/vagrant => vagrant}/provision/director.bash | 0 {test/vagrant => vagrant}/provision/icinga2.bash | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename {test/vagrant => vagrant}/LICENSE (100%) rename {test/vagrant => vagrant}/Makefile (100%) rename {test/vagrant => vagrant}/README.md (100%) rename {test/vagrant => vagrant}/Vagrantfile (100%) rename {test/vagrant => vagrant}/grafana/cluster_status_cluster1.json (100%) rename {test/vagrant => vagrant}/grafana/node_status_p1.json (100%) rename {test/vagrant => vagrant}/grafana/node_status_p2.json (100%) rename {test/vagrant => vagrant}/provision/check_patroni.bash (100%) rename {test/vagrant => vagrant}/provision/director.bash (100%) rename {test/vagrant => vagrant}/provision/icinga2.bash (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f48bf54..52d2ad5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ $ rm -r .venv A vagrant file is available to create a icinga / opm / grafana stack and install check_patroni. You can then add a server to the supervision and -watch the graphs in grafana. It's in `./test/vagrant`. +watch the graphs in grafana. It's in the `vagrant` directory. A vagrant file can be found in [this repository](https://github.com/ioguix/vagrant-patroni to generate a patroni/etcd diff --git a/test/vagrant/LICENSE b/vagrant/LICENSE similarity index 100% rename from test/vagrant/LICENSE rename to vagrant/LICENSE diff --git a/test/vagrant/Makefile b/vagrant/Makefile similarity index 100% rename from test/vagrant/Makefile rename to vagrant/Makefile diff --git a/test/vagrant/README.md b/vagrant/README.md similarity index 100% rename from test/vagrant/README.md rename to vagrant/README.md diff --git a/test/vagrant/Vagrantfile b/vagrant/Vagrantfile similarity index 100% rename from test/vagrant/Vagrantfile rename to vagrant/Vagrantfile diff --git a/test/vagrant/grafana/cluster_status_cluster1.json b/vagrant/grafana/cluster_status_cluster1.json similarity index 100% rename from test/vagrant/grafana/cluster_status_cluster1.json rename to vagrant/grafana/cluster_status_cluster1.json diff --git a/test/vagrant/grafana/node_status_p1.json b/vagrant/grafana/node_status_p1.json similarity index 100% rename from test/vagrant/grafana/node_status_p1.json rename to vagrant/grafana/node_status_p1.json diff --git a/test/vagrant/grafana/node_status_p2.json b/vagrant/grafana/node_status_p2.json similarity index 100% rename from test/vagrant/grafana/node_status_p2.json rename to vagrant/grafana/node_status_p2.json diff --git a/test/vagrant/provision/check_patroni.bash b/vagrant/provision/check_patroni.bash similarity index 100% rename from test/vagrant/provision/check_patroni.bash rename to vagrant/provision/check_patroni.bash diff --git a/test/vagrant/provision/director.bash b/vagrant/provision/director.bash similarity index 100% rename from test/vagrant/provision/director.bash rename to vagrant/provision/director.bash diff --git a/test/vagrant/provision/icinga2.bash b/vagrant/provision/icinga2.bash similarity index 100% rename from test/vagrant/provision/icinga2.bash rename to vagrant/provision/icinga2.bash From 1e3da856cc4a5124aef77acf3bebe677b672e0d3 Mon Sep 17 00:00:00 2001 From: benoit Date: Mon, 11 Jul 2022 12:34:40 +0200 Subject: [PATCH 2/3] Rename doc to docs --- CONTRIBUTING.md | 3 ++- {doc => docs}/make_readme.sh | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename {doc => docs}/make_readme.sh (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52d2ad5..3643be1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,6 @@ $ deactivate $ rm -r .venv ``` - ## Development Environment A vagrant file is available to create a icinga / opm / grafana stack and @@ -43,6 +42,8 @@ A vagrant file can be found in [this repository](https://github.com/ioguix/vagrant-patroni to generate a patroni/etcd setup. +The `README.md` can be geneated with `./docs/make_readme.sh`. + ## Executing Tests diff --git a/doc/make_readme.sh b/docs/make_readme.sh similarity index 100% rename from doc/make_readme.sh rename to docs/make_readme.sh From 8519416c1183b0a51789da1a45849997c2344cfb Mon Sep 17 00:00:00 2001 From: benoit Date: Mon, 11 Jul 2022 12:36:04 +0200 Subject: [PATCH 3/3] Rename test to tests --- CONTRIBUTING.md | 2 +- {test => tests}/json/cluster_config_has_changed.json | 0 {test => tests}/json/cluster_has_leader_ko.json | 0 {test => tests}/json/cluster_has_leader_ok.json | 0 {test => tests}/json/cluster_has_replica_ko.json | 0 {test => tests}/json/cluster_has_replica_ko_lag.json | 0 {test => tests}/json/cluster_has_replica_ok.json | 0 {test => tests}/json/cluster_has_replica_ok_lag.json | 0 {test => tests}/json/cluster_is_in_maintenance_ko.json | 0 .../json/cluster_is_in_maintenance_ko_pause_false.json | 0 {test => tests}/json/cluster_is_in_maintenance_ok.json | 0 .../json/cluster_is_in_maintenance_ok_pause_false.json | 0 {test => tests}/json/cluster_node_count.json | 0 {test => tests}/json/cluster_node_count_critical.json | 0 {test => tests}/json/cluster_node_count_ok.json | 0 {test => tests}/json/cluster_node_count_running_critical.json | 0 {test => tests}/json/cluster_node_count_running_warning.json | 0 {test => tests}/json/cluster_node_count_warning.json | 0 {test => tests}/json/node_is_alive.json | 0 {test => tests}/json/node_is_pending_restart_ko.json | 0 {test => tests}/json/node_is_pending_restart_ok.json | 0 {test => tests}/json/node_is_primary_ko.json | 0 {test => tests}/json/node_is_primary_ok.json | 0 {test => tests}/json/node_is_replica_ko.json | 0 {test => tests}/json/node_is_replica_ok.json | 0 {test => tests}/json/node_patroni_version.json | 0 {test => tests}/json/node_tl_has_changed.json | 0 {test => tests}/test_cluster_config_has_changed.py | 0 {test => tests}/test_cluster_has_leader.py | 0 {test => tests}/test_cluster_has_replica.py | 0 {test => tests}/test_cluster_is_in_maintenance.py | 0 {test => tests}/test_cluster_node_count.py | 0 {test => tests}/test_node_is_alive.py | 0 {test => tests}/test_node_is_pending_restart.py | 0 {test => tests}/test_node_is_primary.py | 0 {test => tests}/test_node_is_replica.py | 0 {test => tests}/test_node_patroni_version.py | 0 {test => tests}/test_node_tl_has_changed.py | 0 {test => tests}/tools.py | 0 39 files changed, 1 insertion(+), 1 deletion(-) rename {test => tests}/json/cluster_config_has_changed.json (100%) rename {test => tests}/json/cluster_has_leader_ko.json (100%) rename {test => tests}/json/cluster_has_leader_ok.json (100%) rename {test => tests}/json/cluster_has_replica_ko.json (100%) rename {test => tests}/json/cluster_has_replica_ko_lag.json (100%) rename {test => tests}/json/cluster_has_replica_ok.json (100%) rename {test => tests}/json/cluster_has_replica_ok_lag.json (100%) rename {test => tests}/json/cluster_is_in_maintenance_ko.json (100%) rename {test => tests}/json/cluster_is_in_maintenance_ko_pause_false.json (100%) rename {test => tests}/json/cluster_is_in_maintenance_ok.json (100%) rename {test => tests}/json/cluster_is_in_maintenance_ok_pause_false.json (100%) rename {test => tests}/json/cluster_node_count.json (100%) rename {test => tests}/json/cluster_node_count_critical.json (100%) rename {test => tests}/json/cluster_node_count_ok.json (100%) rename {test => tests}/json/cluster_node_count_running_critical.json (100%) rename {test => tests}/json/cluster_node_count_running_warning.json (100%) rename {test => tests}/json/cluster_node_count_warning.json (100%) rename {test => tests}/json/node_is_alive.json (100%) rename {test => tests}/json/node_is_pending_restart_ko.json (100%) rename {test => tests}/json/node_is_pending_restart_ok.json (100%) rename {test => tests}/json/node_is_primary_ko.json (100%) rename {test => tests}/json/node_is_primary_ok.json (100%) rename {test => tests}/json/node_is_replica_ko.json (100%) rename {test => tests}/json/node_is_replica_ok.json (100%) rename {test => tests}/json/node_patroni_version.json (100%) rename {test => tests}/json/node_tl_has_changed.json (100%) rename {test => tests}/test_cluster_config_has_changed.py (100%) rename {test => tests}/test_cluster_has_leader.py (100%) rename {test => tests}/test_cluster_has_replica.py (100%) rename {test => tests}/test_cluster_is_in_maintenance.py (100%) rename {test => tests}/test_cluster_node_count.py (100%) rename {test => tests}/test_node_is_alive.py (100%) rename {test => tests}/test_node_is_pending_restart.py (100%) rename {test => tests}/test_node_is_primary.py (100%) rename {test => tests}/test_node_is_replica.py (100%) rename {test => tests}/test_node_patroni_version.py (100%) rename {test => tests}/test_node_tl_has_changed.py (100%) rename {test => tests}/tools.py (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3643be1..e7d95e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,5 +47,5 @@ The `README.md` can be geneated with `./docs/make_readme.sh`. ## Executing Tests -The pytests are in `./test` and use a moker to provide a json response instead +The pytests are in `./tests` and use a moker to provide a json response instead of having to call the patroni API. diff --git a/test/json/cluster_config_has_changed.json b/tests/json/cluster_config_has_changed.json similarity index 100% rename from test/json/cluster_config_has_changed.json rename to tests/json/cluster_config_has_changed.json diff --git a/test/json/cluster_has_leader_ko.json b/tests/json/cluster_has_leader_ko.json similarity index 100% rename from test/json/cluster_has_leader_ko.json rename to tests/json/cluster_has_leader_ko.json diff --git a/test/json/cluster_has_leader_ok.json b/tests/json/cluster_has_leader_ok.json similarity index 100% rename from test/json/cluster_has_leader_ok.json rename to tests/json/cluster_has_leader_ok.json diff --git a/test/json/cluster_has_replica_ko.json b/tests/json/cluster_has_replica_ko.json similarity index 100% rename from test/json/cluster_has_replica_ko.json rename to tests/json/cluster_has_replica_ko.json diff --git a/test/json/cluster_has_replica_ko_lag.json b/tests/json/cluster_has_replica_ko_lag.json similarity index 100% rename from test/json/cluster_has_replica_ko_lag.json rename to tests/json/cluster_has_replica_ko_lag.json diff --git a/test/json/cluster_has_replica_ok.json b/tests/json/cluster_has_replica_ok.json similarity index 100% rename from test/json/cluster_has_replica_ok.json rename to tests/json/cluster_has_replica_ok.json diff --git a/test/json/cluster_has_replica_ok_lag.json b/tests/json/cluster_has_replica_ok_lag.json similarity index 100% rename from test/json/cluster_has_replica_ok_lag.json rename to tests/json/cluster_has_replica_ok_lag.json diff --git a/test/json/cluster_is_in_maintenance_ko.json b/tests/json/cluster_is_in_maintenance_ko.json similarity index 100% rename from test/json/cluster_is_in_maintenance_ko.json rename to tests/json/cluster_is_in_maintenance_ko.json diff --git a/test/json/cluster_is_in_maintenance_ko_pause_false.json b/tests/json/cluster_is_in_maintenance_ko_pause_false.json similarity index 100% rename from test/json/cluster_is_in_maintenance_ko_pause_false.json rename to tests/json/cluster_is_in_maintenance_ko_pause_false.json diff --git a/test/json/cluster_is_in_maintenance_ok.json b/tests/json/cluster_is_in_maintenance_ok.json similarity index 100% rename from test/json/cluster_is_in_maintenance_ok.json rename to tests/json/cluster_is_in_maintenance_ok.json diff --git a/test/json/cluster_is_in_maintenance_ok_pause_false.json b/tests/json/cluster_is_in_maintenance_ok_pause_false.json similarity index 100% rename from test/json/cluster_is_in_maintenance_ok_pause_false.json rename to tests/json/cluster_is_in_maintenance_ok_pause_false.json diff --git a/test/json/cluster_node_count.json b/tests/json/cluster_node_count.json similarity index 100% rename from test/json/cluster_node_count.json rename to tests/json/cluster_node_count.json diff --git a/test/json/cluster_node_count_critical.json b/tests/json/cluster_node_count_critical.json similarity index 100% rename from test/json/cluster_node_count_critical.json rename to tests/json/cluster_node_count_critical.json diff --git a/test/json/cluster_node_count_ok.json b/tests/json/cluster_node_count_ok.json similarity index 100% rename from test/json/cluster_node_count_ok.json rename to tests/json/cluster_node_count_ok.json diff --git a/test/json/cluster_node_count_running_critical.json b/tests/json/cluster_node_count_running_critical.json similarity index 100% rename from test/json/cluster_node_count_running_critical.json rename to tests/json/cluster_node_count_running_critical.json diff --git a/test/json/cluster_node_count_running_warning.json b/tests/json/cluster_node_count_running_warning.json similarity index 100% rename from test/json/cluster_node_count_running_warning.json rename to tests/json/cluster_node_count_running_warning.json diff --git a/test/json/cluster_node_count_warning.json b/tests/json/cluster_node_count_warning.json similarity index 100% rename from test/json/cluster_node_count_warning.json rename to tests/json/cluster_node_count_warning.json diff --git a/test/json/node_is_alive.json b/tests/json/node_is_alive.json similarity index 100% rename from test/json/node_is_alive.json rename to tests/json/node_is_alive.json diff --git a/test/json/node_is_pending_restart_ko.json b/tests/json/node_is_pending_restart_ko.json similarity index 100% rename from test/json/node_is_pending_restart_ko.json rename to tests/json/node_is_pending_restart_ko.json diff --git a/test/json/node_is_pending_restart_ok.json b/tests/json/node_is_pending_restart_ok.json similarity index 100% rename from test/json/node_is_pending_restart_ok.json rename to tests/json/node_is_pending_restart_ok.json diff --git a/test/json/node_is_primary_ko.json b/tests/json/node_is_primary_ko.json similarity index 100% rename from test/json/node_is_primary_ko.json rename to tests/json/node_is_primary_ko.json diff --git a/test/json/node_is_primary_ok.json b/tests/json/node_is_primary_ok.json similarity index 100% rename from test/json/node_is_primary_ok.json rename to tests/json/node_is_primary_ok.json diff --git a/test/json/node_is_replica_ko.json b/tests/json/node_is_replica_ko.json similarity index 100% rename from test/json/node_is_replica_ko.json rename to tests/json/node_is_replica_ko.json diff --git a/test/json/node_is_replica_ok.json b/tests/json/node_is_replica_ok.json similarity index 100% rename from test/json/node_is_replica_ok.json rename to tests/json/node_is_replica_ok.json diff --git a/test/json/node_patroni_version.json b/tests/json/node_patroni_version.json similarity index 100% rename from test/json/node_patroni_version.json rename to tests/json/node_patroni_version.json diff --git a/test/json/node_tl_has_changed.json b/tests/json/node_tl_has_changed.json similarity index 100% rename from test/json/node_tl_has_changed.json rename to tests/json/node_tl_has_changed.json diff --git a/test/test_cluster_config_has_changed.py b/tests/test_cluster_config_has_changed.py similarity index 100% rename from test/test_cluster_config_has_changed.py rename to tests/test_cluster_config_has_changed.py diff --git a/test/test_cluster_has_leader.py b/tests/test_cluster_has_leader.py similarity index 100% rename from test/test_cluster_has_leader.py rename to tests/test_cluster_has_leader.py diff --git a/test/test_cluster_has_replica.py b/tests/test_cluster_has_replica.py similarity index 100% rename from test/test_cluster_has_replica.py rename to tests/test_cluster_has_replica.py diff --git a/test/test_cluster_is_in_maintenance.py b/tests/test_cluster_is_in_maintenance.py similarity index 100% rename from test/test_cluster_is_in_maintenance.py rename to tests/test_cluster_is_in_maintenance.py diff --git a/test/test_cluster_node_count.py b/tests/test_cluster_node_count.py similarity index 100% rename from test/test_cluster_node_count.py rename to tests/test_cluster_node_count.py diff --git a/test/test_node_is_alive.py b/tests/test_node_is_alive.py similarity index 100% rename from test/test_node_is_alive.py rename to tests/test_node_is_alive.py diff --git a/test/test_node_is_pending_restart.py b/tests/test_node_is_pending_restart.py similarity index 100% rename from test/test_node_is_pending_restart.py rename to tests/test_node_is_pending_restart.py diff --git a/test/test_node_is_primary.py b/tests/test_node_is_primary.py similarity index 100% rename from test/test_node_is_primary.py rename to tests/test_node_is_primary.py diff --git a/test/test_node_is_replica.py b/tests/test_node_is_replica.py similarity index 100% rename from test/test_node_is_replica.py rename to tests/test_node_is_replica.py diff --git a/test/test_node_patroni_version.py b/tests/test_node_patroni_version.py similarity index 100% rename from test/test_node_patroni_version.py rename to tests/test_node_patroni_version.py diff --git a/test/test_node_tl_has_changed.py b/tests/test_node_tl_has_changed.py similarity index 100% rename from test/test_node_tl_has_changed.py rename to tests/test_node_tl_has_changed.py diff --git a/test/tools.py b/tests/tools.py similarity index 100% rename from test/tools.py rename to tests/tools.py