Fixed test: should-generate-secret

This commit is contained in:
erik 2022-07-15 17:34:10 +02:00
parent 44bb1ae9f0
commit e6866cd591

View file

@ -39,9 +39,9 @@
(deftest should-generate-secret (deftest should-generate-secret
(is (= {:GITEA__database__USER-c1 "", (is (= {:GITEA__database__USER-c1 "",
:GITEA__database__USER-c2 "pg-user", :GITEA__database__USER-c2 (b64/encode "pg-user"),
:GITEA__database__PASSWD-c1 "", :GITEA__database__PASSWD-c1 "",
:GITEA__database__PASSWD-c2 "pg-pw", :GITEA__database__PASSWD-c2 (b64/encode "pg-pw"),
:GITEA__mailer__USER-c1 "", :GITEA__mailer__USER-c1 "",
:GITEA__mailer__USER-c2 (b64/encode "maileruser"), :GITEA__mailer__USER-c2 (b64/encode "maileruser"),
:GITEA__mailer__PASSWD-c1 "", :GITEA__mailer__PASSWD-c1 "",
@ -56,21 +56,3 @@
:mailer-pw "mailerpw"}))))) :mailer-pw "mailerpw"})))))
(not
(=
{:GITEA__server__DOMAIN-c2 "test.com",
:GITEA__mailer__FROM-c1 "",
:GITEA__service__EMAIL_DOMAIN_WHITELIST-c2 "abc.com,def.com",
:GITEA__service__EMAIL_DOMAIN_WHITELIST-c1 "",
:GITEA__mailer__HOST-c1 ":",
:GITEA__mailer__FROM-c2 "test@test.com",
:GITEA__mailer__HOST-c2 "mail.test.com:123",
:GITEA__server__ROOT_URL-c2 "https://test.com",
:GITEA__server__ROOT_URL-c1 "https://",
:GITEA__server__DOMAIN-c1 ""}
{:GITEA__server__DOMAIN-c1 "",
:GITEA__server__DOMAIN-c2 "test.com",
:GITEA__server__ROOT_URL-c1 "https://",
:GITEA__server__ROOT_URL-c2 "https://test.com",
:GITEA__service__EMAIL_DOMAIN_WHITELIST-c1 "",
:GITEA__service__EMAIL_DOMAIN_WHITELIST-c2 "abc.com,def.com"}))