Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions tests/CLI/modules/vs/vs_create_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,13 @@ def test_create_like(self, confirm_mock):
}

confirm_mock.return_value = True
# Prompts to confirm hostname, domain, and datacenter.
stdin = "\n\n\n"
result = self.run_command(['vs', 'create',
'--like=123',
'--san',
'--billing=hourly'])
'--billing=hourly'],
stdin=stdin)

self.assert_no_fail(result)
self.assertIn('"guid": "1a2b3c-1701"', result.output)
Expand Down Expand Up @@ -426,10 +429,13 @@ def test_create_like_tags(self, confirm_mock):
}

confirm_mock.return_value = True
# Prompts to confirm hostname, domain, and datacenter.
stdin = "\n\n\n"
result = self.run_command(['vs', 'create',
'--like=123',
'--san',
'--billing=hourly'])
'--billing=hourly'],
stdin=stdin)

self.assert_no_fail(result)
self.assertIn('"guid": "1a2b3c-1701"', result.output)
Expand Down Expand Up @@ -457,10 +463,13 @@ def test_create_like_image(self, confirm_mock):
}

confirm_mock.return_value = True
# Prompts to confirm hostname, domain, and datacenter.
stdin = "\n\n\n"
result = self.run_command(['vs', 'create',
'--like=123',
'--san',
'--billing=hourly'])
'--billing=hourly'],
stdin=stdin)

self.assert_no_fail(result)
self.assertIn('"guid": "1a2b3c-1701"', result.output)
Expand Down Expand Up @@ -499,7 +508,9 @@ def test_create_like_flavor(self, confirm_mock):
}

confirm_mock.return_value = True
result = self.run_command(['vs', 'create', '--like=123'])
# Prompts to confirm hostname, domain, and datacenter.
stdin = "\n\n\n"
result = self.run_command(['vs', 'create', '--like=123'], stdin=stdin)

self.assert_no_fail(result)
self.assertIn('"guid": "1a2b3c-1701"', result.output)
Expand Down Expand Up @@ -540,7 +551,9 @@ def test_create_like_transient(self, confirm_mock):
}

confirm_mock.return_value = True
result = self.run_command(['vs', 'create', '--like=123'])
# Prompts to confirm hostname, domain, and datacenter.
stdin = "\n\n\n"
result = self.run_command(['vs', 'create', '--like=123'], stdin=stdin)

self.assert_no_fail(result)
self.assertIn('"guid": "1a2b3c-1701"', result.output)
Expand Down
Loading