8000 How can flex support elasticsearch functions in test environment? · Issue #31 · ddnexus/flex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
How can flex support elasticsearch functions in test environment? #31
Open
@ChunAllen

Description

@ChunAllen

Hi @ddnexus I'm moving the flex functions to its model and made is as callback for example:

Here's my model Category

class Category < ActiveRecord::Base 
  after_create :create_by_flex
  after_update :update_by_flex
  after_destroy :destroy_by_flex

  private
    def create_by_flex
      flex_store
    end

    def update_by_flex
      flex_store
    end

    def destroy_by_flex
      flex_remove
    end
end

Now I'm having error with my test environment because it cannot see the `flex functions.
How can we mock elasticsearch/flex functions in test environment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0