flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Run the e2e smtp servers only when configured to do so

Open cstns opened this issue 8 months ago • 1 comments

Description

  • added a new isEmailEnabled cypress command that checks if email is configured
  • skipping tests that need email config when not configured locally
  • running smtp containers only if configured in the yml file

Smtp containers will run only if the following configuration is present in the etc/flowforge.local.yml file:

...
e2e:
  email:
    os:
      enabled: false
      debug: true
      smtp:
        host: localhost
        port: 1025
        web_port: 8025
        secure: false
    ee:
      enabled: true
      debug: true
      smtp:
        host: localhost
        port: 1026
        web_port: 8026
        secure: false
...

This allows a granular approach to testing

Related Issue(s)

docs update https://github.com/FlowFuse/website/pull/3188

Checklist

  • [x] I have read the contribution guidelines
  • [x] Suitable unit/system level tests have been added and they pass
  • [ ] Documentation has been updated
    • [ ] Upgrade instructions
    • [ ] Configuration details
    • [ ] Concepts
  • [ ] Changes flowforge.yml?
    • [ ] Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • [ ] Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • [ ] Includes a DB migration? -> add the area:migration label

cstns avatar Apr 23 '25 15:04 cstns

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.31%. Comparing base (cb4d14f) to head (14edfe1). Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5457   +/-   ##
=======================================
  Coverage   77.31%   77.31%           
=======================================
  Files         350      350           
  Lines       16583    16583           
  Branches     3865     3865           
=======================================
  Hits        12821    12821           
  Misses       3762     3762           
Flag Coverage Δ
backend 77.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 23 '25 15:04 codecov[bot]