Instead of using `kamal envify` to generate the .env file, we now assume that it will be in place for us. Options in place of `kamal envify`: 1. Pre-generate the .env file 2. Create the env file in the `.pre-init` hook 3. Log into a secret store/check you are logged in in the pre-init hook Then use .dotenv command and variable substitution to interpolate the secrets.
19 lines
616 B
Ruby
19 lines
616 B
Ruby
require_relative "integration_test"
|
|
|
|
class LockTest < IntegrationTest
|
|
test "acquire, release, status" do
|
|
kamal :lock, :acquire, "-m 'Integration Tests'"
|
|
|
|
status = kamal :lock, :status, capture: true
|
|
assert_match /Locked by: Deployer at .*\nVersion: #{latest_app_version}\nMessage: Integration Tests/m, status
|
|
|
|
error = kamal :deploy, capture: true, raise_on_error: false
|
|
assert_match /Deploy lock found. Run 'kamal lock help' for more information/m, error
|
|
|
|
kamal :lock, :release
|
|
|
|
status = kamal :lock, :status, capture: true
|
|
assert_match /There is no deploy lock/m, status
|
|
end
|
|
end
|