Skip to content

Commit

Permalink
remove HandleServiceController main function
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Feb 17, 2024
1 parent bdb88ed commit 412bc7a
Showing 1 changed file with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import us.kbase.auth.AuthToken;
import us.kbase.common.test.controllers.mongo.MongoController;
import us.kbase.common.test.controllers.shock.ShockController;


/** Q&D Utility to run the Handle Service for the purposes of testing from Java.
Expand Down Expand Up @@ -137,36 +136,4 @@ public void destroy(final boolean deleteTempFiles, final boolean dumpLogToStdOut
FileUtils.deleteDirectory(tempDir.toFile());
}
}

public static void main(String[] args) throws Exception {
MongoController monc = new MongoController(
"/kb/runtime/bin/mongod",
Paths.get("workspacetesttemp"), false);
ShockController sc = new ShockController(
"/kb/deployment/bin/shock-server",
"0.9.6",
Paths.get("workspacetesttemp"),
System.getProperty("test.user1"),
"localhost:" + monc.getServerPort(),
"shockdb", "foo", "foo", new URL("http://foo.com"));
HandleServiceController hsc = new HandleServiceController(
monc,
"http://localhost:" + sc.getServerPort(),
null, //this will break the hm, need a token
Paths.get("workspacetesttemp"),
new URL("http://foo.com"),
"KBASE_ADMIN",
"/kb/deployment/lib",
"handle_controller_test_handle_db");
System.out.println("handlesrv: " + hsc.getHandleServerPort());
System.out.println(hsc.getTempDir());
Scanner reader = new Scanner(System.in);
System.out.println("any char to shut down");
//get user input for a
reader.next();
hsc.destroy(false);
sc.destroy(false);
monc.destroy(false);
reader.close();
}
}

0 comments on commit 412bc7a

Please sign in to comment.