From 28dea1706523f5d6aee074be2abc0c2409cb9982 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 13 Oct 2020 09:22:28 +0300 Subject: [PATCH] ci: prevent Periodic failure, ensure VSMTP_TEST_USER/VSMTP_TEST_PASS are set in smtp_test.v --- vlib/net/smtp/smtp_test.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlib/net/smtp/smtp_test.v b/vlib/net/smtp/smtp_test.v index 371822b172..0cb8f8a01f 100644 --- a/vlib/net/smtp/smtp_test.v +++ b/vlib/net/smtp/smtp_test.v @@ -22,7 +22,10 @@ fn test_smtp() { username: os.getenv('VSMTP_TEST_USER') password: os.getenv('VSMTP_TEST_PASS') } - + if client_cfg.username == '' && client_cfg.password == '' { + eprintln('Please set VSMTP_TEST_USER and VSMTP_TEST_PASS before running this test') + exit(0) + } send_cfg := smtp.Mail{ to: 'dev@vlang.io' subject: 'Hello from V2'