Skip to content

Commit

Permalink
NCL-6600 Remove unused endpoint code. Refactor to prepare sharing sam…
Browse files Browse the repository at this point in the history
…e task split code for endpoints.
  • Loading branch information
rnc committed Jun 15, 2021
1 parent 77a378b commit d0072cc
Show file tree
Hide file tree
Showing 10 changed files with 210 additions and 442 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void collect( final List<Project> projects )
return;
}

final ArrayList<ProjectVersionRef> restLookupProjectVersionParamList = new ArrayList<>();
final List<ProjectVersionRef> restLookupProjectVersionParamList = new ArrayList<>();
final String override = vs.getOverride();

for ( final Project project : projects )
Expand All @@ -105,7 +105,6 @@ else if ( project.isExecutionRoot() )
}
}

// TODO: ### Remove newProjectKeys from initial rest call
final List<ProjectVersionRef> restLookupVersionsParamList = new ArrayList<>();
final Set<ArtifactRef> localDeps = establishAllDependencies( session, projects, null );

Expand All @@ -116,11 +115,6 @@ else if ( project.isExecutionRoot() )
restLookupVersionsParamList.add( p.asProjectVersionRef() );
}

// TODO: ### : test to see if this is affecting the tests.
// For Monday: yes, so it means AddSuffixJettyHandler must be expecting the project types to do checks on what to return for deps.
// Solution: depends on how many occurrences .... adapt `setSuffix` to set mixed/custom as desired ?
// restLookupVersionsParamList.addAll( restLookupProjectVersionParamList );

// Call the REST to populate the result.
logger.debug ("Passing {} GAVs into the REST client api {} ", restLookupVersionsParamList.size(), restLookupVersionsParamList);
Map<ProjectVersionRef, String> vRestResult = state.getVersionTranslator().lookupVersions( restLookupVersionsParamList );
Expand All @@ -135,8 +129,6 @@ else if ( project.isExecutionRoot() )
versions.add( value );
} );
vs.setRESTMetadata( versionStates );
// TODO: ### parseVersions pulls out project refs from prior rest call.
// vs.setRESTMetadata (parseVersions(session, projects, state, restLookupProjectVersionParamList, pvResultResult));

final Map<ArtifactRef, String> overrides = new HashMap<>();

Expand Down
18 changes: 0 additions & 18 deletions integration-test/src/it/rest-blacklist/invoker.properties

This file was deleted.

64 changes: 0 additions & 64 deletions integration-test/src/it/rest-blacklist/pom.xml

This file was deleted.

19 changes: 0 additions & 19 deletions integration-test/src/it/rest-blacklist/test.properties

This file was deleted.

41 changes: 0 additions & 41 deletions integration-test/src/it/rest-blacklist/verify.groovy

This file was deleted.

4 changes: 2 additions & 2 deletions integration-test/src/it/rest-version-manip-only/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ pom.properties.each {
}
assert (passed == true)

//def buildLog = new File( basedir, 'build.log' )
//assert buildLog.getText().contains( 'Passing 6 GAVs' )
def buildLog = new File( basedir, 'build.log' )
assert buildLog.getText().contains( 'Passing 6 GAVs' )
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.commonjava.maven.ext.integrationtest;

import org.commonjava.maven.ext.common.ManipulationException;
import org.commonjava.maven.ext.io.rest.handler.AddSuffixJettyHandler;
import org.commonjava.maven.ext.io.rest.rule.MockServer;
import org.junit.Before;
Expand Down Expand Up @@ -200,35 +199,6 @@ public void testRESTVersionManipRelocate() throws Exception
runLikeInvoker( test, mockServer.getUrl() );
}

@Test(expected = ManipulationException.class)
public void testRESTBlacklist() throws Exception
{
try
{
handler.setBlacklistVersion( "1.0");
String test = getDefaultTestLocation( "rest-blacklist" );
runLikeInvoker( test, mockServer.getUrl() );
}
finally
{
handler.setBlacklistVersion( null);
}
}

@Test
public void testRESTBlacklist2() throws Exception
{
try
{
handler.setBlacklistVersion( "1.0.redhat-3");
String test = getDefaultTestLocation( "rest-blacklist" );
runLikeInvoker( test, mockServer.getUrl() );
}
finally
{
handler.setBlacklistVersion( null);
}
}

@Test
public void testRESTHeaders() throws Exception
Expand Down
Loading

0 comments on commit d0072cc

Please sign in to comment.