acmesh-official / acmetest Goto Github PK
View Code? Open in Web Editor NEWUnit test project for acme.sh project
Home Page: https://acme.sh
Unit test project for acme.sh project
Home Page: https://acme.sh
When running the push action workflow I got errors in shellcheck and shfmt and tried to get it running locally.
When running locally with
$ dash rundocker.sh testall
------------------------------------------
_rr='1'
_ret='1'
ubuntu:latest [FAIL]
[Thu 23 Jun 2022 11:08:17 AM CEST] Failed: ubuntu:latest
./rundocker.sh: 414: [: unexpected operator
Test for case: le_test_dnsapi
[Thu 23 Jun 2022 11:08:17 AM CEST] debian:latest
<snip>
The error is fixable by removing a "=" in line 414
diff --git a/rundocker.sh b/rundocker.sh
index 58e14c7a9..b798be827 100755
--- a/rundocker.sh
+++ b/rundocker.sh
@@ -411,7 +411,7 @@ testplat() {
if [ "$_rret" != "0" ] ; then
_info "Failed: $plat"
_FAILED_PLATS="$_FAILED_PLATS$plat "
- if [ "$TRAVIS" = "true" ] || [ "$GITHUB_ACTIONS" == "true" ]; then
+ if [ "$TRAVIS" = "true" ] || [ "$GITHUB_ACTIONS" = "true" ]; then
return "$_rret"
fi
fi
Thank you for adjusting acmesh-official/acme.sh#4001. This is the follow-up ticket for testing.
Proposal is to include or extend a test case with the option "--debug 2" in order to test the availability and correct workings on default configuration on all platforms.
We need to add test for wget and apache in docker.
maybe different wget versions and different apache versions.
Step 1/2 : FROM archlinux:latest
latest: Pulling from library/archlinux
3a05001ad924: Pulling fs layer
0a1ff60e1cc4: Pulling fs layer
0a1ff60e1cc4: Verifying Checksum
0a1ff60e1cc4: Download complete
3a05001ad924: Verifying Checksum
3a05001ad924: Download complete
3a05001ad924: Pull complete
0a1ff60e1cc4: Pull complete
Digest: sha256:dcde75fac283b82760b5b64eba36447ced63b2cad28a3ed7abad6c2a72385b23
Status: Downloaded newer image for archlinux:latest
---> a8a9773ce02f
Step 2/2 : RUN pacman -Sy --overwrite "*" --noconfirm --noprogressbar openssl cronie socat libidn unzip
---> Running in b7b24ab3ce11
error: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
The command '/bin/sh -c pacman -Sy --overwrite "*" --noconfirm --noprogressbar openssl cronie socat libidn unzip' returned a non-zero code: 255
archlinux:latest [FAIL]
[Fri Feb 12 08:19:18 UTC 2021] Failed: archlinux:latest
Error: Process completed with exit code 255.
The TEST_DNS_SLEEP is missing in the docker.env definition. Therefore the parameter is not set by default and is not used. This should be added.
Problem: Cause of this the docker DNS API Test workflow actions don't use the TEST_DNS_SLEEP value from the secrets. Therefore tests sometimes randomly fail cause the DNS check is ok but Let's Encrypt apparently still gets the old values.
Log before (dnssleep not set):
...
/root/.acme.sh/acme.sh --server "letsencrypt_test" --issue -d "***" -d "*.***" --dns *** --dnssleep ""
...
Let's check each DNS record now. Sleep 20 seconds first.
You can use '--dnssleep' to disable public dns checks.
See: https://github.com/acmesh-official/acme.sh/wiki/dnscheck
...
Log after (dnssleep is set):
...
/root/.acme.sh/acme.sh --server "letsencrypt_test" --issue -d "***" -d "*.***" --dns *** --dnssleep "***"
...
Sleep XXX seconds for the txt records to take effect
...
Alternatively TEST_DNS_SLEEP must be exported explicitly in the DNS.yaml in acme repo.
...
echo "TEST_DNS_NO_WILDCARD" >> docker.env
echo "TEST_DNS_SLEEP" >> docker.env
...
Seems you implemented your own test framework/runner. You noticed https://github.com/kward/shunit2 by @kward exists, which provides all the basic things already? ๐ถ
Don't know whether a switch is worth it, just wanted to make you aware of it.
because you use #!/usr/bin/env
but in this OS env located in /bin/env
so please modify installator that way to work in any case.
For the new DNS-Api for Selfhost we must save some information to the domain.conf. But the Testcase "txt record to a subdomain not _acme-challenge" with subdomain "acmetestXyzRandomName" keeps failing with the error "config file is empty, can not save".
I think the problem could be that this testcase is calling the dns skript directly without further setup or the preceeding issuing process.
Should this testcase actually be an issuing for "domain-alias" dns alias mode?
Fork: Marvo2011/acme.sh#6
PullRequest: acmesh-official/acme.sh#3873
Log:
[Fri Aug 26 05:36:41 UTC 2022] Calling acme-dns on selfhost
[Fri Aug 26 05:36:41 UTC 2022] fulldomain='acmetestXyzRandomName.***'
[Fri Aug 26 05:36:41 UTC 2022] txtvalue='acmeTestTxtRecord'
[Fri Aug 26 05:36:41 UTC 2022] config file is empty, can not read ***_LAST_USED_INTERNAL
[Fri Aug 26 05:36:41 UTC 2022] mapEntry='acmetestXyzRandomName.***:XXXXXX1:XXXXXX2'
[Fri Aug 26 05:36:41 UTC 2022] lastUsedRidForDomainEntry
[Fri Aug 26 05:36:41 UTC 2022] Trying to add acmeTestTxtRecord on selfhost for rid: XXXXXX1
[Fri Aug 26 05:36:41 UTC 2022] GET
[Fri Aug 26 05:36:41 UTC 2022] url='https://selfhost.de/cgi-bin/api.pl?username=***&***'
[Fri Aug 26 05:36:41 UTC 2022] timeout=
[Fri Aug 26 05:36:41 UTC 2022] _CURL='curl --silent --dump-header /root/.acme.sh/http.header -L '
[Fri Aug 26 05:36:43 UTC 2022] ret='0'
[Fri Aug 26 05:36:43 UTC 2022] config file is empty, can not save ***=***
[Fri Aug 26 05:36:43 UTC 2022] config file is empty, can not save ***_LAST_USED_INTERNAL=;acmetestXyzRandomName.***:XXXXXX1;
Run Failed
Hi, I'm currently trying to fix the failed test of "opensuse/leap".
From the commit history and with several experiments, I've figured out a working fix for me.
So I'd like to have a discussion first, to have a proper fix for the project in the end.
Current definition for opensuse/leap in plat.conf:
-opensuse|zypper update -y |zypper install -y |tar,openssl,cron,socat,curl,libidn|
opensuse/leap|
My working fix:
-opensuse/leap|zypper rr repo-non-oss repo-update-non-oss && zypper update -y |zypper install -y |tar,openssl,cron,socat,curl,gzip,unzip|
opensuse/leap:latest|
Discussions:
zypper rr repo-non-oss repo-update-non-oss
: Taken from commit history and adapted to the repo name for openSUSE Leap 15. My guess is that by removing unnecessary package repos, it saves many seconds during a test run.
gzip
: Apparently gzip is not in the image of opensuse/leap:15 on Docker Hub. So it's necessary to explicitly add it.
unzip
: According to commit history of plat.conf
, unzip
was removed from all distros and added back only to ubuntu. I'm not sure the purpose. But for NGROK test to work in opensuse/leap, unzip
is required to extract ngrok binary.
libidn
(Removed): The package repo do not have libidn
, causing the test to fail. A package with the name libidn2-0
is already installed. I'm not sure the whether the proper fix is to remove it or to replace with another libidn package.
S | Name | Summary | Type
--+-----------------+-------------------------------------------------------+--------
| libidn-devel | Development files for libidn | package
| libidn-tools | Command line utility to convert Int. Domain Names | package
| libidn11 | Support for Internationalized Domain Names (IDN) | package
| libidn11-32bit | Support for Internationalized Domain Names (IDN) | package
i | libidn2-0 | Support for Internationalized Domain Names (IDN) | package
| libidn2-0-32bit | Support for Internationalized Domain Names (IDN) | package
| libidn2-devel | Include Files and Libraries mandatory for Development | package
| libidn2-lang | Translations for package libidn2 | package
| libidn2-tools | Command line utility to convert Int. Domain Names | package
| perl-Net-LibIDN | Net::LibIDN Perl module | package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.