summaryrefslogtreecommitdiff
path: root/lib/chef/knife/bootstrap
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2019-04-30 14:11:54 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2019-05-02 12:44:29 -0400
commite177c05fb6f0e3d0bd4fb0d905842ef71e508614 (patch)
tree0227c397fa101e78bf2f83a984dc138fe6f95f0b /lib/chef/knife/bootstrap
parent1c0a097bd1f9f55d4db199b0681afd68f52c218e (diff)
downloadchef-e177c05fb6f0e3d0bd4fb0d905842ef71e508614.tar.gz
Remove testing method TrainConnector#test_instance
This can live in the tests. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
Diffstat (limited to 'lib/chef/knife/bootstrap')
-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