elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.18k stars 3.5k forks source link

Logstash-plugin generate test in the acceptance suite doesn't work #7195

Open ph opened 7 years ago

ph commented 7 years ago

There is a few errors in theses examples:

  1. The File.directory? check wont work because logstash is not a path
  2. The install command won't work because the plugin is not build as a *.gem and the path is invalid.

This is a revert of https://github.com/elastic/logstash/pull/6879


describe "on #{logstash.hostname}" do

    GENERATE_TYPES = ["input", "filter", "codec", "output"]

    GENERATE_TYPES.each do |type|
      context "with type #{type}" do
        it "successfully generate the plugin skeleton" do
          command = logstash.run_command_in_path("bin/logstash-plugin generate --type #{type} --name qatest-generated")
          expect(logstash).to File.directory?("logstash-#{type}-qatest-generated")
        end
        it "successfully install the plugin" do
           command = logstash.run_command_in_path("bin/logstash-plugin install logstash-#{type}-qatest-generated")
           expect(command).to install_successfully
           expect(logstash).to have_installed?("logstash-#{type}-qatest-generated")
        end
      end
    end
  end
end
ph commented 7 years ago

@wainersm would you mind to take a look? Where you able to run the theses tests locally?

wainersm commented 7 years ago

hi @ph , sure. Please assign it to me.

ph commented 7 years ago

@wainersm I can't assign it to you, you have to assign it to yourself. :)

wainersm commented 7 years ago

Hi @ph ! I can't assign issues (even to myself), perhaps because I'm not in the elastic organization group. Anyway, I am working on this item... unfortunately setting up and running the acceptance tests using vagrant has been a pain. The ci_acceptance.sh script halts forever on bootstrapping the VMs. Then I managed to run the rake commands manually, did so progress but some tests still keep running ad-infinitum.

I let you posted.

wainersm commented 7 years ago

Ok, I'm now able to generate the plugins inside the vagrant box. But #7267 blocks the progress of this task, unless I figure out how to generate the Gem file out of the plugin source.