| Chunk |
|---|
| Conflicting content |
|---|
}
public String toString() {
<<<<<<< HEAD
return String.format(
"Pool[id: %s, owner: %s, product: %s, quantity: %d, expires: %s]",
this.getId(),
this.owner,
this.getProductId(),
this.getQuantity(),
this.getEndDate()
);
}
@JsonIgnore
public Set |
| Solution content |
|---|
}
public String toString() {
return String.format(
"Pool |
| File |
|---|
| Pool.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
private boolean shouldGenerateV3(Entitlement entitlement) {
Consumer consumer = entitlement.getConsumer();
<<<<<<< HEAD
if (consumer.getType().isManifest()) {
for (ConsumerCapability capability : consumer.getCapabilities()) {
if ("cert_v3".equals(capability.getName())) {
return true;
}
}
return false;
}
else if (consumer.getType().getLabel().equals(
ConsumerTypeEnum.HYPERVISOR.getLabel())) {
// Hypervisors in this context don't use content, so allow v3
return true;
}
else {
String entitlementVersion = consumer.getFact("system.certificate_version");
log.debug("Entitlement version: {}", entitlementVersion);
return entitlementVersion != null && entitlementVersion.startsWith("3.");
}
=======
return consumer.isCertV3Capable();
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
}
/** |
| Solution content |
|---|
private boolean shouldGenerateV3(Entitlement entitlement) {
Consumer consumer = entitlement.getConsumer();
return consumer != null && consumer.isCertV3Capable();
}
/** |
| File |
|---|
| DefaultEntitlementCertServiceAdapter.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (StringUtils.isBlank(c.getVendor())) {
c.setVendor("unknown");
}
<<<<<<< HEAD
c.setOwner(o);
=======
/*
* On standalone servers we will set metadata expire to 1 second so
* clients an immediately get changes to content when published on the
* server. We would use 0, but the client plugin interprets this as unset
* and ignores it completely resulting in the default yum values being
* used.
*
* We know this is a standalone server due to the fact that import is
* being used, so there is no need to guard this behavior.
*/
c.setMetadataExpire(new Long(1));
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
contentCurator.createOrUpdate(c);
}
|
| Solution content |
|---|
if (StringUtils.isBlank(c.getVendor())) {
c.setVendor("unknown");
}
c.setOwner(o);
/*
* On standalone servers we will set metadata expire to 1 second so
* clients an immediately get changes to content when published on the
* server. We would use 0, but the client plugin interprets this as unset
* and ignores it completely resulting in the default yum values being
* used.
*
* We know this is a standalone server due to the fact that import is
* being used, so there is no need to guard this behavior.
*/
c.setMetadataExpire(new Long(1));
contentCurator.createOrUpdate(c);
}
|
| File |
|---|
| ProductImporter.java |
| Developer's decision |
|---|
| Concatenation |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
package org.candlepin.policy; import static org.junit.Assert.*; <<<<<<< HEAD import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; ======= import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; >>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446 import org.candlepin.common.config.Configuration; import org.candlepin.config.ConfigProperties; |
| Solution content |
|---|
package org.candlepin.policy; import static org.junit.Assert.*; import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import org.candlepin.common.config.Configuration; import org.candlepin.config.ConfigProperties; |
| File |
|---|
| AutobindRulesTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testSelectBestPoolsFiltersTooMuchContent() {
<<<<<<< HEAD
Product mktProduct = new Product(productId, "A test product", owner);
Product engProduct = new Product(Integer.toString(TestUtil.randomInt()),
"An ENG product", owner);
Set |
| Solution content |
|---|
@Test
public void testSelectBestPoolsFiltersTooMuchContent() {
Pool pool = createV3OnlyPool();
List |
| File |
|---|
| AutobindRulesTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
List |
| Solution content |
|---|
}
@Test
public void testSelectBestPoolsLotsOfContentV2Client() {
Product mktProduct = new Product(
productId,
"A test product",
owner
);
Product engProduct = new Product(
Integer.toString(TestUtil.randomInt()),
"An ENG product",
owner
);
}
public void testSelectBestPoolsDoesntFilterTooMuchContentForHypervisor() {
Pool pool = createV3OnlyPool();
List |
| File |
|---|
| AutobindRulesTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
engProduct.setContent(productContent);
Pool pool = TestUtil.createPool(owner, mktProduct);
pool.setId("DEAD-BEEF");
<<<<<<< HEAD
pool.addProvidedProduct(engProduct);
List |
| Solution content |
|---|
engProduct.setContent(productContent);
Pool pool = TestUtil.createPool(owner, mktProduct);
pool.setId("DEAD-BEEF");
pool.addProvidedProduct(engProduct);
return pool;
}
@Test |
| File |
|---|
| AutobindRulesTest.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return e;
}
<<<<<<< HEAD
private Consumer mockConsumer(Product... installedProducts) {
=======
private Entitlement mockUnmappedGuestEntitlement(Consumer consumer, String productId,
DateRange range, String ... providedProductIds) {
consumer.setFact("virt.is_guest", "True");
Entitlement e = mockEntitlement(consumer, productId, range, providedProductIds);
Pool p = e.getPool();
Date endDateOverride = new Date(consumer.getCreated().getTime() +
(24 * 60 * 60 * 1000));
e.setEndDateOverride(endDateOverride);
// Setup the attributes for stacking:
p.setAttribute("virt_only", "true");
p.setAttribute("unmapped_guests_only", "true");
p.addProductAttribute(new ProductPoolAttribute("virt_limit", "unlimited",
productId));
return e;
}
private Consumer mockConsumer(String ... installedProducts) {
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
Consumer c = new Consumer();
c.setType(new ConsumerType(ConsumerType.ConsumerTypeEnum.SYSTEM));
for (Product product : installedProducts) { |
| Solution content |
|---|
return e;
}
private Entitlement mockUnmappedGuestEntitlement(Consumer consumer, Product product,
DateRange range, Product ... providedProducts) {
consumer.setFact("virt.is_guest", "True");
Entitlement e = mockEntitlement(consumer, product, range, providedProducts);
Pool p = e.getPool();
Date endDateOverride = new Date(consumer.getCreated().getTime() + (24 * 60 * 60 * 1000));
e.setEndDateOverride(endDateOverride);
// Setup the attributes for stacking:
p.setAttribute("virt_only", "true");
p.setAttribute("unmapped_guests_only", "true");
product.setAttribute("virt_limit", "unlimited");
return e;
}
private Consumer mockConsumer(Product... installedProducts) {
Consumer c = new Consumer();
c.setType(new ConsumerType(ConsumerType.ConsumerTypeEnum.SYSTEM));
for (Product product : installedProducts) { |
| File |
|---|
| InstalledProductStatusCalculatorTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method declaration |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
// Environment, with promoted content:
Environment e = new Environment("env1", "Env 1", owner);
<<<<<<< HEAD
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
when(entitlement.getConsumer().getEnvironment()).thenReturn(e);
=======
e.getEnvironmentContent().add(new EnvironmentContent(e, content.getId(), true));
consumer.setEnvironment(e);
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
Map |
| Solution content |
|---|
// Environment, with promoted content:
Environment e = new Environment("env1", "Env 1", owner);
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
this.consumer.setEnvironment(e);
Map |
| File |
|---|
| DefaultEntitlementCertServiceAdapterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// Setup an environment for the consumer:
Environment e = new Environment("env1", "Awesome Environment #1", owner);
<<<<<<< HEAD
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
when(entitlement.getConsumer().getEnvironment()).thenReturn(e);
=======
e.getEnvironmentContent().add(new EnvironmentContent(e, content.getId(), true));
consumer.setEnvironment(e);
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
certServiceAdapter.createX509Certificate(entitlement,
product, new HashSet |
| Solution content |
|---|
// Setup an environment for the consumer:
Environment e = new Environment("env1", "Awesome Environment #1", owner);
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
this.consumer.setEnvironment(e);
certServiceAdapter.createX509Certificate(entitlement,
product, new HashSet |
| File |
|---|
| DefaultEntitlementCertServiceAdapterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// Setup an environment for the consumer:
Environment e = new Environment("env1", "Awesome Environment #1", owner);
<<<<<<< HEAD
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
when(entitlement.getConsumer().getEnvironment()).thenReturn(e);
=======
e.getEnvironmentContent().add(new EnvironmentContent(e, content.getId(), true));
consumer.setEnvironment(e);
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
certServiceAdapter.createX509Certificate(entitlement,
product, new HashSet |
| Solution content |
|---|
// Setup an environment for the consumer:
Environment e = new Environment("env1", "Awesome Environment #1", owner);
e.getEnvironmentContent().add(new EnvironmentContent(e, content, true));
this.consumer.setEnvironment(e);
certServiceAdapter.createX509Certificate(entitlement,
product, new HashSet |
| File |
|---|
| DefaultEntitlementCertServiceAdapterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public void testPrepareV3EntitlementDataForBooleans() throws IOException {
Set |
| Solution content |
|---|
public void testPrepareV3EntitlementDataForBooleans() throws IOException {
Set |
| File |
|---|
| DefaultEntitlementCertServiceAdapterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
CONTENT_TYPE, CONTENT_VENDOR, url, CONTENT_GPG_URL, ARCH_LABEL));
}
extremeProduct.setContent(extremeContent);
<<<<<<< HEAD
when(entitlement.getConsumer().getFact("system.certificate_version"))
.thenReturn("3.2");
when(entitlement.getConsumer().getUuid()).thenReturn("test-consumer");
when(productAdapter.getProductById(eq(extremeProduct.getOwner()), eq(extremeProduct.getId())))
.thenReturn(extremeProduct);
=======
consumer.setFact("system.certificate_version", "3.2");
when(productAdapter.getProductById(eq(extremeProduct.getId()))).thenReturn(extremeProduct);
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
certServiceAdapter.prepareV3Extensions(entitlement, "prefix", null);
Set |
| Solution content |
|---|
CONTENT_TYPE, CONTENT_VENDOR, url, CONTENT_GPG_URL, ARCH_LABEL));
}
extremeProduct.setContent(extremeContent);
consumer.setUuid("test-consumer");
consumer.setFact("system.certificate_version", "3.2");
consumer.setFact("uname.machine", "x86_64");
when(productAdapter.getProductById(eq(extremeProduct.getOwner()), eq(extremeProduct.getId())))
.thenReturn(extremeProduct);
certServiceAdapter.prepareV3Extensions(entitlement, "prefix", null);
Set |
| File |
|---|
| DefaultEntitlementCertServiceAdapterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.candlepin.sync; <<<<<<< HEAD import static org.junit.Assert.assertEquals; ======= import static org.junit.Assert.*; >>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446 import static org.mockito.Mockito.*; import org.candlepin.common.config.MapConfiguration; |
| Solution content |
|---|
*/ package org.candlepin.sync; import static org.junit.Assert.*; import static org.mockito.Mockito.*; import org.candlepin.common.config.MapConfiguration; |
| File |
|---|
| ProductImporterTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private ProductImporter importer;
private ProductCurator productCuratorMock;
private ContentCurator contentCuratorMock;
<<<<<<< HEAD
private Owner owner = new Owner("Test Corporation");
=======
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
@Before
public void setUp() throws IOException { |
| Solution content |
|---|
private ProductImporter importer;
private ProductCurator productCuratorMock;
private ContentCurator contentCuratorMock;
private Owner owner = new Owner("Test Corporation");
@Before
public void setUp() throws IOException { |
| File |
|---|
| ProductImporterTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
// Returns the Content object added
<<<<<<< HEAD
private void addContentTo(Product p) {
Owner owner = new Owner("Example-Corporation");
Content c = new Content(owner, "name", "100130", "label", "type",
=======
private Content addContentTo(Product p) {
Content c = new Content("name", "100130", "label", "type",
>>>>>>> 5ebe95155048987c164e34261dc6730f07f7f446
"vendor", "url", "gpgurl", "arch");
c.setMetadataExpire(1000L);
p.getProductContent().add(new ProductContent(p, c, true)); |
| Solution content |
|---|
}
// Returns the Content object added
private Content addContentTo(Product p) {
Owner owner = new Owner("Example-Corporation");
Content c = new Content(
owner, "name", "100130", "label", "type", "vendor", "url", "gpgurl", "arch"
);
c.setMetadataExpire(1000L);
p.getProductContent().add(new ProductContent(p, c, true)); |
| File |
|---|
| ProductImporterTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Variable |