summaryrefslogtreecommitdiff
path: root/lib/chef/knife/bootstrap/train_connector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/bootstrap/train_connector.rb')
-rw-r--r--lib/chef/knife/bootstrap/train_connector.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/chef/knife/bootstrap/train_connector.rb b/lib/chef/knife/bootstrap/train_connector.rb
index 5230d6638c..429874dc07 100644
--- a/lib/chef/knife/bootstrap/train_connector.rb
+++ b/lib/chef/knife/bootstrap/train_connector.rb
@@ -44,27 +44,6 @@ class Chef
@config = transport_config(host_url, opts.merge(uri_opts))
end
- # Because creating a valid train connection for testing is a two-step process in which
- # we need to connect before mocking config,
- # we expose test_instance as a way for tests to create actual instances
- # but ensure that they don't connect to any back end.
- def self.test_instance(url, protocol: "ssh",
- family: "unknown", name: "unknown",
- release: "unknown", arch: "x86_64",
- opts: {})
- # Specifying sudo: false ensures that attempted operations
- # don't fail because the mock platform doesn't support sudo
- tc = TrainConnector.new(url, protocol, { sudo: false }.merge(opts))
- tc.connect!
- tc.connection.mock_os(
- family: family,
- name: name,
- release: release,
- arch: arch
- )
- tc
- end
-
def connect!
# Force connection to establish
connection.wait_until_ready