def test__required_config_or_result_keys(self): required_keys = Skopeo._required_config_or_result_keys() expected_required_keys = [ 'containers-config-auth-file', 'destination-url', 'src-tls-verify', 'dest-tls-verify', 'service-name', 'application-name', 'organization', 'container-image-version', 'image-tar-file' ] self.assertEqual(required_keys, expected_required_keys)
def test_result(self): defaults = Skopeo.step_implementer_config_defaults() expected_defaults = { 'src-tls-verify': True, 'dest-tls-verify': True, 'container-image-pull-repository-type': 'containers-storage:', 'container-image-push-repository-type': 'docker://' } self.assertEqual(defaults, expected_defaults)
def test_step_implementer_config_defaults(self): defaults = Skopeo.step_implementer_config_defaults() expected_defaults = { 'containers-config-auth-file': os.path.join( Path.home(), '.container-image-repo-auth.json' ), 'dest-tls-verify': 'true', 'src-tls-verify': 'true' } self.assertEqual(defaults, expected_defaults)
def test_result(self): required_keys = Skopeo._required_config_or_result_keys() expected_required_keys = [ 'destination-url', ['source-tls,verify', 'src-tls-verify'], 'dest-tls-verify', 'service-name', 'application-name', 'organization', ['container-image-pull-tag', 'container-image-tag'], [ 'container-image-pull-repository-type', 'container-image-repository-type' ], [ 'container-image-push-repository-type', 'container-image-repository-type' ] ] self.assertEqual(required_keys, expected_required_keys)
def test_result(self): required_keys = Skopeo._required_config_or_result_keys() expected_required_keys = [ [ 'container-image-pull-registry-type', 'container-image-registry-type' ], ['container-image-pull-address', 'container-image-build-address'], ['source-tls,verify', 'src-tls-verify'], [ 'container-image-push-registry-type', 'container-image-registry-type' ], ['container-image-push-registry', 'destination-url'], ['container-image-push-repository', 'container-image-repository'], [ 'container-image-push-tag', 'container-image-tag', 'container-image-version' ], 'dest-tls-verify' ] self.assertEqual(required_keys, expected_required_keys)