def TrustDelete(self, registry, sigstoretype): trust = Trust() args = self.Args() args.sigstoretype = sigstoretype args.registry = registry trust.set_args(args) trust.delete()
def test_delete_trust(self): args = self.Args() args.pubkeys = [] args.sigstoretype = "web" args.registry = "registry.example.com/foo" args.pubkeys = None testobj = Trust(policy_filename=TEST_POLICY) testobj.atomic_config = util.get_atomic_config(atomic_config=os.path.join(FIXTURE_DIR, "atomic.conf")) testobj.set_args(args) testobj.delete() with open(testobj.policy_filename, "r") as f: d = json.load(f) self.assertNotIn(args.registry, d["transports"]["docker"])
def test_delete_trust(self): args = self.Args() args.pubkeys = [] args.sigstoretype = "web" args.registry = "registry.example.com/foo" args.pubkeys = None testobj = Trust(policy_filename=TEST_POLICY) testobj.atomic_config = util.get_atomic_config( atomic_config=os.path.join(FIXTURE_DIR, "atomic.conf")) testobj.set_args(args) testobj.delete() with open(testobj.policy_filename, 'r') as f: d = json.load(f) self.assertNotIn(args.registry, d["transports"]["docker"])