Contents

plugins support

@with-plugin

As a rebuild developer I want to be able to extend Rebuild CLI functionality with plugins

Scenario: Rebuild CLI notifies plugins on start

  • When I successfully run `rbld help`
  • Then the output should contain "Hello from Rebuild CLI plugin"

Scenario: Rebuild CLI notifies plugins on command execution

  • When I successfully run `rbld list`
  • Then the output should contain "Hello from Rebuild CLI plugin"
  • And the output should contain "Hello from Rebuild CLI plugin command 'list()' handler"

Scenario: Rebuild CLI may extend set of Rebuild CLI commands

  • When I successfully run `rbld help hello`
  • Then the output should contain "Hello from rbld hello 'usage' handler"
  • When I successfully run `rbld hello`
  • Then the output should contain "Hello from rbld hello 'run' handler"

Scenario: Plugins may interrupt Rebuild CLI execution

  • Given I set the environment variables to:
    variablevalue
    RBLD_HELLO_FAIL_START1
  • When I run `rbld help`
  • Then the exit status should be 100

Scenario: Plugins may interrupt Rebuild CLI command execution

  • Given I set the environment variables to:
    variablevalue
    RBLD_HELLO_FAIL_COMMAND1
  • And existing environment test-env1
  • When I run `rbld help`
  • Then the exit status should be 0
  • When I run `rbld list`
  • Then the exit status should be 100
  • When I run `rbld rm test-env1`
  • Then the exit status should be 100
  • And environment test-env1 should exist

Source: features/engine/plugins.feature at commit 44889ff6, Rebuild (Apache-2.0 license).