From 8c88a116816d01696f573fe49bb74ef7d7b4cfac Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 30 Apr 2025 20:07:20 -0300 Subject: Makefile: Add test for valid key expiration date --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 97a63e3..823d3db 100644 --- a/Makefile +++ b/Makefile @@ -196,6 +196,8 @@ derived-assets = \ baseurl.txt \ fingerprint.txt \ expiry.txt \ + expiry-epoch.txt \ + now.txt \ src/content/.well-known/security.txt \ src/all-contents.txt \ src/all-filelists.txt \ @@ -326,6 +328,12 @@ expiry.txt: src/content/$(PUBURL) awk -F: '/^pub:/ { print $$7 }' | \ xargs -I% date -Is -d@% > $@ +expiry-epoch.txt: expiry.txt + date -d "`cat expiry.txt`" '+%s' > $@ + +now.txt: + now > $@ + src/content/.well-known/security.txt.gz: src/content/.well-known/security.txt src/content/.well-known/security.txt: email.txt baseurl.txt expiry.txt mkdir -p $(@D) @@ -419,8 +427,12 @@ check-unit-sitemap-count: src/content/sitemap.xml check-unit-sitemap: check-unit-sitemap-count check-unit-sitemap-size +check-unit-expiry: expiry-epoch.txt now.txt + test "`cat expiry-epoch.txt`" -gt "`cat now.txt`" + + check-unit: check-unit-sorting check-unit-updatedat check-unit-links -check-unit: check-unit-sitemap +check-unit: check-unit-sitemap check-unit-expiry integration-tests = \ -- cgit v1.2.3