Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replace empty worker with basic hello world

  • Loading branch information...
commit 0ab04726a5287f48aad9458454ee77d42ad34982 1 parent 09cd77a
@richard-julien authored
View
9 client/src/test/java/io/iron/ironworker/client/APIClientTest.java
@@ -21,10 +21,13 @@
//System environment variables for iron worker.
public static String IRON_IO_TOKEN = "IRON_IO_TOKEN";
public static String IRON_IO_PROJECT_ID = "IRON_IO_PROJECT_ID";
+ //Default worker
+ public static final String UNIT_TEST_WORKER = "UnitTestWorker";
+ public static final String SIMPLE_WORKER_ZIP_FILE = "hello_world_worker.zip";
+ public static final String WORKER_RUNTIME = "ruby";
//Token and project
private static String _ironToken;
private static String _ironProjectId;
- public static final String UNIT_TEST_WORKER = "UnitTestWorker";
@BeforeClass
public static void init() {
@@ -47,9 +50,9 @@ public void shouldConnexionFail() throws APIException {
@Test
public void shouldCodesCreate() throws APIException {
APIClient client = new APIClient(_ironToken, _ironProjectId);
- URL resource = getClass().getClassLoader().getResource("unit_test_empty.zip");
+ URL resource = getClass().getClassLoader().getResource(SIMPLE_WORKER_ZIP_FILE);
JsonObject codeCreate = client.codesCreate(
- UNIT_TEST_WORKER, resource.getFile(), "ruby", "unit_test.zip");
+ UNIT_TEST_WORKER, resource.getFile(), WORKER_RUNTIME, SIMPLE_WORKER_ZIP_FILE);
assertEquals("Upload successful.", codeCreate.get("msg").getAsString());
}
View
BIN  client/src/test/resources/hello_world_worker.zip
Binary file not shown
View
BIN  client/src/test/resources/unit_test_empty.zip
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.