Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for dynamic domains in big tests #3109

Merged
merged 3 commits into from
May 25, 2021
Merged

Commits on May 24, 2021

  1. Replace 'get_host_type' with 'get_domain_host_type'.

    The implementation of 'get_host_type' changed, but the calls did not,
      which led to accepting subdomains where they should not be accepted.
    
    Also:
      - Call 'filter_local_packet' for host type
      - To work correctly for subdomains,
          'mongoose_subhosts' needs to be used temporarily.
    chrzaszcz committed May 24, 2021
    Configuration menu
    Copy the full SHA
    9368e8a View commit details
    Browse the repository at this point in the history
  2. Use host types in acc_e2e_SUITE

    - Configure the host type in the test spec
    - Remove domain_isolation_SUITE (for now)
      - It was passing before because both the test and the code
          were not using dynamic domains, it started failing
          after the previous commit, which fixed the code.
      - The module itself has a bug (reported)
      - It uses MUC Light which lacks dynamic domain support (for now)
      - It needs to use host types
    chrzaszcz committed May 24, 2021
    Configuration menu
    Copy the full SHA
    bc607c8 View commit details
    Browse the repository at this point in the history
  3. Set host type explicitly

    Motivation:
      - Avoiding unnecessary ETS lookups.
      - Limiting 'mongoose_acc:new' logic to handling the data structure
      - It is not clear whether the default mapping should use
          'get_host_type' or 'get_domain_host_type'.
      - Sometimes it is much better for the module to verify the result,
          e.g. make sure the host type exists.
      - The host type was sometimes not needed, but it was obtained
          implicitly. Most often when it is actually needed,
          it is already known to the caller so it can be set explicitly,
          sparing the extra ETS lookup.
        IMO this good practice is further encouraged by not having a default.
    chrzaszcz committed May 24, 2021
    Configuration menu
    Copy the full SHA
    a5ccb12 View commit details
    Browse the repository at this point in the history