Add ENV['SERVICE'] to hooks
This commit is contained in:
@@ -43,6 +43,7 @@ class CliTestCase < ActiveSupport::TestCase
|
||||
|
||||
def assert_hook_ran(hook, output, version:, service_version:, hosts:, command:, subcommand: nil, runtime: false)
|
||||
performer = `whoami`.strip
|
||||
service = service_version.split("@").first
|
||||
|
||||
assert_match "Running the #{hook} hook...\n", output
|
||||
|
||||
@@ -52,6 +53,7 @@ class CliTestCase < ActiveSupport::TestCase
|
||||
KAMAL_PERFORMER=\"#{performer}\"\s
|
||||
KAMAL_VERSION=\"#{version}\"\s
|
||||
KAMAL_SERVICE_VERSION=\"#{service_version}\"\s
|
||||
KAMAL_SERVICE=\"#{service}\"\s
|
||||
KAMAL_HOSTS=\"#{hosts}\"\s
|
||||
KAMAL_COMMAND=\"#{command}\"\s
|
||||
#{"KAMAL_SUBCOMMAND=\\\"#{subcommand}\\\"\\s" if subcommand}
|
||||
|
||||
Reference in New Issue
Block a user