Esempio n. 1
0
    def test_verifier_list(self):
        v1 = db.verifier_create("a1", "b1", "c1", "d1", "e1", False)
        v2 = db.verifier_create("a2", "b2", "c2", "d2", "e2", False)
        vs = db.verifier_list()
        self.assertEqual(sorted([v1["uuid"], v2["uuid"]]),
                         sorted([v["uuid"] for v in vs]))

        v1 = db.verifier_update(v1["uuid"], status="foo")
        vs = db.verifier_list(status="foo")
        self.assertEqual(1, len(vs))
        self.assertEqual(v1["uuid"], vs[0]["uuid"])
Esempio n. 2
0
    def test_verifier_list(self):
        v1 = db.verifier_create("a1", "b1", "c1", "d1", "e1", False)
        v2 = db.verifier_create("a2", "b2", "c2", "d2", "e2", False)
        vs = db.verifier_list()
        self.assertEqual(sorted([v1["uuid"], v2["uuid"]]),
                         sorted([v["uuid"] for v in vs]))

        v1 = db.verifier_update(v1["uuid"], status="foo")
        vs = db.verifier_list(status="foo")
        self.assertEqual(1, len(vs))
        self.assertEqual(v1["uuid"], vs[0]["uuid"])
Esempio n. 3
0
 def create(cls, name, vtype, platform, source, version, system_wide,
            extra_settings=None):
     db_entry = db.verifier_create(name=name, vtype=vtype,
                                   platform=platform, source=source,
                                   version=version, system_wide=system_wide,
                                   extra_settings=extra_settings)
     return cls(db_entry)
Esempio n. 4
0
 def create(cls, name, vtype, platform, source, version, system_wide,
            extra_settings=None):
     db_entry = db.verifier_create(name=name, vtype=vtype,
                                   platform=platform, source=source,
                                   version=version, system_wide=system_wide,
                                   extra_settings=extra_settings)
     return cls(db_entry)
Esempio n. 5
0
    def setUp(self):
        super(VerificationTestCase, self).setUp()

        self.verifier = db.verifier_create("a", "b", "c", "d", "e", False)
        self.deploy = db.deployment_create({})
Esempio n. 6
0
 def test_verification_update(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     v = db.verifier_update(v["uuid"], source="foo", version="bar")
     self.assertEqual("foo", v["source"])
     self.assertEqual("bar", v["version"])
Esempio n. 7
0
 def test_verifier_delete(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     db.verifier_delete(v["uuid"])
     self.assertRaises(exceptions.ResourceNotFound, db.verifier_delete,
                       v["uuid"])
Esempio n. 8
0
 def test_verifier_get(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     self.assertEqual("a", db.verifier_get(v["uuid"])["name"])
Esempio n. 9
0
    def setUp(self):
        super(VerificationTestCase, self).setUp()

        self.verifier = db.verifier_create("a", "b", "c", "d", "e", False)
        self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, [])
Esempio n. 10
0
    def setUp(self):
        super(VerificationTestCase, self).setUp()

        self.verifier = db.verifier_create("a", "b", "c", "d", "e", False)
        self.env = db.env_create(self.id(), "INIT", "", {}, {}, {}, [])
Esempio n. 11
0
 def test_verification_update(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     v = db.verifier_update(v["uuid"], source="foo", version="bar")
     self.assertEqual("foo", v["source"])
     self.assertEqual("bar", v["version"])
Esempio n. 12
0
 def test_verifier_delete(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     db.verifier_delete(v["uuid"])
     self.assertRaises(exceptions.DBRecordNotFound, db.verifier_delete,
                       v["uuid"])
Esempio n. 13
0
 def test_verifier_get(self):
     v = db.verifier_create("a", "b", "c", "d", "e", False)
     self.assertEqual("a", db.verifier_get(v["uuid"])["name"])
Esempio n. 14
0
    def setUp(self):
        super(VerificationTestCase, self).setUp()

        self.verifier = db.verifier_create("a", "b", "c", "d", "e", False)
        self.deploy = db.deployment_create({})