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

[WIP] Add integration Rails environment #20350

Closed
wants to merge 11 commits into from

Commits on Aug 19, 2020

  1. Adds integration Rails env

    Configuration settings for integration testings.  A mix between
    development and production, using production as a base and pulling in
    specific options from development where appropriate.
    
    `ENV['CYPRESS_DEV']` can be used as flag to enable more debugging
    settings where needed.
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    af7daeb View commit details
    Browse the repository at this point in the history
  2. [miq_worker/runner][integration] Skip sync_config

    The `sync_config` code assumes memcache, so for now just skip if in the
    `Rails.env.integration?`
    
    This is a poor solution long term since this causes issues when trying
    to run integration tests against an "Integration ENV appliance", so this
    should be addressed to work in a different way.
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    7ac3766 View commit details
    Browse the repository at this point in the history
  3. [Gemfile] Move rpsec/parallel_tests to integration

    Adds an integration group for dependencies that need to be used for both
    integration tests and "regular tests"
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    b482c06 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7227baf View commit details
    Browse the repository at this point in the history
  5. [evm.rake] Split foreman tasks

    Allows them to be reused.
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    8dcb97f View commit details
    Browse the repository at this point in the history
  6. [evm.rake] Use app_prefix in evm:compile_assets

    When calling `evm:compile_assets`, allow it to be called from a plugin
    so that repos like the UI can compile assets from the plugin repo
    instead of the `manageiq` repo.
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    f0b4acc View commit details
    Browse the repository at this point in the history
  7. Add integration.rake tasks

    Helper tasks that is used to run the necessary MiqWorker components for
    running integration tests.
    
    CYPRESS_DEV
    -----------
    
    Note on different modes:
    
    - no `CYPRESS_DEV`:  "prod mode" where assets are static (CI, "faster")
    - w/ `CYPRESS_DEV`:  dev mode where javascript assets might be edited
    
    When using $CYPRESS_DEV, it is assumed that the user is modifying specs
    or what they are testing, so being able to change those without having
    to re-compile is ideal, but on CI, compiling should be a speed up for
    the specs overall, and more "production like".
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    a4688f5 View commit details
    Browse the repository at this point in the history
  8. [FIXUP][integration.rake] support extra_workers

    This is a hidden feature for now, but it is just a low cost way to
    include support for multiple workers.  Easily removable if we don't like
    it.
    NickLaMuro committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    662be0a View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2020

  1. [FIXUP][integration.rb] config.assets.gzip = false

    We `gzip` compress assets via `webpack`, so this "should" be
    unecessary... need to confirm.
    NickLaMuro committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    3a8e502 View commit details
    Browse the repository at this point in the history
  2. [FIXUP][integration.rake] Reset environments path

    When doing `rake :env`, the `config.paths` method has already been
    called/memoized when the `config/application.rb`, so that causes the
    following to be called:
    
        paths.add "config/environments", glob: "#{Rails.env}.rb"
    
    Which even before `:env` has a chance to run, it will set the `:glob`
    attribute to the "default `Rails.env`", which in turn only allows
    loading the include `developement.rb` when the initializer to load the
    environment config for `Vmdb::Applciation` is finally trigger.
    
    While not the best of solutions, I prefer it to having to have super
    long commands like this:
    
        $ RAILS_ENV=integration rake integration:seed:db
    
    Where `integration` is implied by the task itself (and helps "codify"
    workflows).
    NickLaMuro committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    5f44ed5 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2020

  1. [FIXUP][integration.rake] Forget if this is needed...

    While working through and debugging the previous FIXUP commits, this
    came up as something to try, but not sure if it is needed.  Might go
    away, but trying to commit/push what I have so I can transition to
    working on something else.
    NickLaMuro committed Aug 21, 2020
    Configuration menu
    Copy the full SHA
    90623d0 View commit details
    Browse the repository at this point in the history