-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use terraform-runner /live api in Terraform::Runner.available? method #86
Use terraform-runner /live api in Terraform::Runner.available? method #86
Conversation
@putmanoj will this work with any version of the opentofu-runner or is this API new? |
spec/lib/terraform/runner_spec.rb
Outdated
@@ -20,8 +20,10 @@ | |||
|
|||
describe "is .available" do | |||
before do | |||
stub_request(:get, "#{terraform_runner_url}/ping") | |||
.to_return(:status => 200, :body => {'count' => 0}.to_json) | |||
ENV["TERRAFORM_RUNNER_URL"] = "https://1.2.3.4:7000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed since we do stub_const("ENV", ENV.to_h.merge("TERRAFORM_RUNNER_URL" => terraform_runner_url))
up on line 11?
@putmanoj can you squash these 4 commits into 1? I don't normally push for this but this change is so simple I don't think these 4 commits really show any meaningful progress to be preserved in the git history. |
Also can you add a comment in the PR and commit description about why the change the /live vs /ping fixes the issue? |
cc @putmanoj #86 (comment) and #86 (comment) are still outstanding |
0d41bc8
to
d876a44
Compare
Done @agrare |
I'm not going to mark this for backport yet until we confirm that a version of the opentofu-runner will be in the target branch |
This is a small change.
/live
api added by the component, inTerraform::Runner.available?
method/ping
api also will be available.