lib/testlab/container/user.rb in testlab-0.5.0 vs lib/testlab/container/user.rb in testlab-0.5.1
- old
+ new
@@ -13,12 +13,13 @@
# @return [TestLab::User] The primary user for the container.
def primary_user
if self.users.count == 0
case self.distro.downcase
when 'ubuntu' then
- TestLab::User.new "ubuntu" do
+ u = TestLab::User.new "ubuntu" do
password 'ubuntu'
end
+ u.container = self
end
elsif self.users.any?{ |u| u.primary == true }
self.users.find{ |u| u.primary == true }
else
self.users.first