Skip to content

Commit

Permalink
change loon project ip env var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Medeiros committed Jul 14, 2020
1 parent 4a51c1a commit e37bfcb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/task/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (*NetworkingStart) Check(_ context.Context, p *project.Project) (bool, erro
}

func (*NetworkingStart) Env(_ context.Context, p *project.Project) (Env, BinPaths) {
return Env{"PROJECT_IP": p.IP.String()}, nil
return Env{"LOON_PROJECT_IP": p.IP.String()}, nil
}

type NetworkingStop struct{}
Expand Down
2 changes: 1 addition & 1 deletion spec/commands/env_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
describe 'env', command: true do
it 'should show default values' do
loon %(env)
assert_stdout 'PROJECT_IP='
assert_stdout 'LOON_PROJECT_IP='
end

describe 'without .env' do
Expand Down
2 changes: 1 addition & 1 deletion spec/commands/exec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
it 'should execute things in the project environment' do
with_payload do
loon %w(exec env)
assert_stdout %r(PROJECT_IP=\d+.\d+.\d+.\d+)
assert_stdout %r(LOON_PROJECT_IP=\d+.\d+.\d+.\d+)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module Helpers

def project_ip
loon %(env)
%r(^PROJECT_IP=(\d+\.\d+\.\d+\.\d+)$).match(@last_stdout)
%r(^LOON_PROJECT_IP=(\d+\.\d+\.\d+\.\d+)$).match(@last_stdout)
return $1
end

Expand Down

0 comments on commit e37bfcb

Please sign in to comment.