示例#1
0
 def TrustDelete(self, registry, sigstoretype):
     trust = Trust()
     args = self.Args()
     args.sigstoretype = sigstoretype
     args.registry = registry
     trust.set_args(args)
     trust.delete()
示例#2
0
 def TrustDelete(self, registry, sigstoretype):
     trust = Trust()
     args = self.Args()
     args.sigstoretype = sigstoretype
     args.registry = registry
     trust.set_args(args)
     trust.delete()
示例#3
0
 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"])
示例#4
0
 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"])