Exemplo n.º 1
0
 def test_password_initial(self):
     """
     Before the initial configuration is bootstrapped, the password
     is the one written by jenkins.
     """
     self.useFixture(AptInstalledJenkins(self.fakes))
     self.assertEqual(INITIAL_PASSWORD, self.credentials.password())
Exemplo n.º 2
0
 def test_username_initial(self):
     """
     Before the initial configuration is bootstrapped, the username
     is the hard-coded 'admin'.
     """
     self.useFixture(AptInstalledJenkins(self.fakes))
     self.assertEqual("admin", self.credentials.username())
Exemplo n.º 3
0
 def setUp(self):
     super(UsersTest, self).setUp()
     self.useFixture(AptInstalledJenkins(self.fakes))
     self.fakes.jenkins.scripts[GET_LEGACY_TOKEN_SCRIPT.format(
         "admin")] = "abc\n"
     self.apt = AptStub()
     self.packages = Packages(apt=self.apt)
     self.users = Users(packages=self.packages)
Exemplo n.º 4
0
 def setUp(self):
     super(UsersTest, self).setUp()
     self.useFixture(AptInstalledJenkins(self.fakes))
     self.fakes.jenkins.scripts[GET_TOKEN_SCRIPT.format("admin")] = "abc\n"
     self.users = Users()
Exemplo n.º 5
0
 def setUp(self):
     super(ConfigurationTest, self).setUp()
     self.useFixture(AptInstalledJenkins(self.fakes))
     self.configuration = Configuration()