]> git.proxmox.com Git - proxmox-acme.git/blobdiff - src/test/verify-dnsapi-plugins-in-schema.pl
move DNS plugin schema to separate JSON based file
[proxmox-acme.git] / src / test / verify-dnsapi-plugins-in-schema.pl
index 3f1377eb8a6d5810511c1aa5039292a3b9f607ee..a9628612bd67951080628b734bca7dfd146ea44b 100755 (executable)
@@ -5,8 +5,9 @@ use warnings;
 
 use lib '../';
 
-use PVE::Tools qw(dir_glob_foreach);
-use PVE::ACME::DNSChallenge;
+use JSON;
+
+use PVE::Tools qw(dir_glob_foreach file_get_contents);
 
 my $dnsapi_path = '../acme.sh/dnsapi';
 
@@ -18,9 +19,10 @@ dir_glob_foreach($dnsapi_path, qr/dns_(\S+)\.sh/, sub {
     push @$acmesh_plugins, $provider;
 });
 
-my $ok = 1;
-my $defined_plugins = PVE::ACME::DNSChallenge::get_supported_plugins();
+my $DNS_API_CHALLENGE_SCHEMA_FN = '../dns-challenge-schema.json';
+my $defined_plugins = from_json(PVE::Tools::file_get_contents($DNS_API_CHALLENGE_SCHEMA_FN));
 
+my $ok = 1;
 # first check for missing ones, delete from hash so we can easily see if a plug got removed/renamed
 my $printed_missing = 0;
 for my $provider (sort @$acmesh_plugins) {