You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2015/10/13 12:21:45 UTC

[17/50] [abbrv] celix git commit: CELIX-237: Refactoring of rsa_dfi layout (lib, lib-tst, rsa bundle, rsa tst)

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
new file mode 100644
index 0000000..82d908b
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
@@ -0,0 +1,47 @@
+#
+# Licensed under Apache License v2. See LICENSE for more information.
+#
+
+
+include_directories(
+    ${PROJECT_SOURCE_DIR}/launcher/public/include
+    ${PROJECT_SOURCE_DIR}/framework/public/include
+    ${PROJECT_SOURCE_DIR}/utils/public/include
+    ${PROJECT_SOURCE_DIR}/utils/public/include
+    ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include
+    ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
+    bundle
+)
+
+add_subdirectory(bundle)
+
+SET(CMAKE_SKIP_BUILD_RPATH  FALSE) #TODO needed?
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #TODO needed?
+SET(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/framework" "${PROJECT_BINARY_DIR}/utils")
+
+add_executable(test_rsa_dfi
+    run_tests.cpp
+    rsa_tests.cpp
+    rsa_client_server_tests.cpp
+
+    ${PROJECT_SOURCE_DIR}/launcher/private/src/launcher.c #TODO move to libframework
+    ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c
+)
+target_link_libraries(test_rsa_dfi celix_framework celix_utils ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY})
+
+get_property(rsa_bundle_file TARGET remote_service_admin_dfi PROPERTY BUNDLE)
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
+get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE)
+get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE)
+get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
+get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE)
+
+configure_file(config.properties.in config.properties @ONLY)
+configure_file(client.properties.in client.properties @ONLY)
+configure_file(server.properties.in server.properties @ONLY)
+
+add_dependencies(test_rsa_dfi remote_service_admin_dfi calculator)
+
+add_test(NAME run_test_rsa_dfi COMMAND test_rsa_dfi)
+SETUP_TARGET_FOR_COVERAGE(test_rsa_dfi_cov test_rsa_dfi ${CMAKE_BINARY_DIR}/coverage/rsa_dfi)
+

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
new file mode 100644
index 0000000..0c41ed9
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
@@ -0,0 +1,24 @@
+#
+# Licensed under Apache License v2. See LICENSE for more information.
+#
+
+include_directories(
+        ${CPPUTEST_INCLUDE_DIR}
+        ${PROJECT_SOURCE_DIR}/framework/public/include
+        ${PROJECT_SOURCE_DIR}/utils/public/include
+        ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
+)
+
+SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_dfi_tst_bundle")
+SET(BUNDLE_VERSION "0.0.1")
+SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin DFI test bundle")
+
+
+bundle(rsa_dfi_tst_bundle
+    SOURCES
+        tst_activator.c
+
+    FILES
+        ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
+)
+target_link_libraries(rsa_dfi_tst_bundle ${CPPUTEST_LIBRARY} celix_framework celix_utils)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_activator.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_activator.c b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_activator.c
new file mode 100644
index 0000000..728030e
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_activator.c
@@ -0,0 +1,137 @@
+/*
+ * Licensed under Apache License v2. See LICENSE for more information.
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <service_tracker_customizer.h>
+#include <service_tracker.h>
+
+#include "bundle_activator.h"
+#include "bundle_context.h"
+#include "service_registration.h"
+#include "service_reference.h"
+#include "celix_errno.h"
+
+#include "tst_service.h"
+#include "calculator_service.h"
+
+
+struct activator {
+	bundle_context_pt context;
+	struct tst_service serv;
+	service_registration_pt  reg;
+
+	service_tracker_customizer_pt cust;
+	service_tracker_pt tracker;
+	calculator_service_pt calc;
+};
+
+static celix_status_t addCalc(void * handle, service_reference_pt reference, void * service);
+static celix_status_t removeCalc(void * handle, service_reference_pt reference, void * service);
+static int test(void *handle);
+
+celix_status_t bundleActivator_create(bundle_context_pt context, void **out) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *act = calloc(1, sizeof(*act));
+	if (act != NULL) {
+		act->context = context;
+		act->serv.handle = act;
+		act->serv.test = test;
+
+		status = serviceTrackerCustomizer_create(act, NULL, addCalc, NULL, removeCalc, &act->cust);
+		status = CELIX_DO_IF(status, serviceTracker_create(context, CALCULATOR2_SERVICE, act->cust, &act->tracker));
+
+	} else {
+		status = CELIX_ENOMEM;
+	}
+
+	if (status == CELIX_SUCCESS) {
+		*out = act;
+	} else if (act != NULL) {
+		if (act->cust != NULL) {
+			free(act->cust);
+			act->cust = NULL;
+		}
+		if (act->tracker != NULL) {
+			serviceTracker_destroy(act->tracker);
+			act->tracker = NULL;
+		}
+		free(act);
+	}
+
+	return CELIX_SUCCESS;
+}
+
+static celix_status_t addCalc(void * handle, service_reference_pt reference, void * service) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator * act = handle;
+	act->calc = service;
+	return status;
+}
+
+static celix_status_t removeCalc(void * handle, service_reference_pt reference, void * service) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator * act = handle;
+	if (act->calc == service) {
+		act->calc = NULL;
+	}
+	return status;
+
+}
+
+celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+    celix_status_t status = CELIX_SUCCESS;
+	struct activator * act = userData;
+
+	act->reg = NULL;
+	status = bundleContext_registerService(context, (char *)TST_SERVICE_NAME, &act->serv, NULL, &act->reg);
+
+	status = CELIX_DO_IF(status, serviceTracker_open(act->tracker));
+
+
+	return status;
+}
+
+
+celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+    celix_status_t status = CELIX_SUCCESS;
+	struct activator * act = userData;
+
+	status = serviceRegistration_unregister(act->reg);
+	status = CELIX_DO_IF(status, serviceTracker_close(act->tracker));
+
+	return status;
+}
+
+celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+	struct activator *act = userData;
+	if (act != NULL) {
+		if (act->tracker != NULL) {
+			serviceTracker_destroy(act->tracker);
+			act->tracker = NULL;
+		}
+		free(act);
+	}
+	return CELIX_SUCCESS;
+}
+
+static int test(void *handle) {
+	int status = 0;
+	struct activator *act = handle;
+
+	double result = 0.0;
+
+    int rc;
+    if (act->calc != NULL) {
+         rc = act->calc->sqrt(act->calc->calculator, 4, &result);
+        printf("calc result is %d\n", result);
+    } else {
+        printf("calc not ready\n");
+    }
+
+	if (rc != 0 || result != 2.0) {
+		status = 1;
+	}
+	return status;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_service.h
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_service.h b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_service.h
new file mode 100644
index 0000000..2678b0c
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/tst_service.h
@@ -0,0 +1,17 @@
+/*
+ * Licensed under Apache License v2. See LICENSE for more information.
+ */
+
+#ifndef CELIX_TST_SERVICE_H
+#define CELIX_TST_SERVICE_H
+
+#define TST_SERVICE_NAME "tst_service"
+
+struct tst_service {
+    void *handle;
+    int (*test)(void *handle);
+};
+
+typedef struct tst_service *tst_service_pt;
+
+#endif //CELIX_TST_SERVICE_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/client.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/client.properties.in b/remote_services/remote_service_admin_dfi/rsa_tst/client.properties.in
new file mode 100644
index 0000000..a9a06fb
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/client.properties.in
@@ -0,0 +1,8 @@
+cosgi.auto.start.1=@rsa_bundle_file@ @calculator_shell_bundle_file@ @discovery_configured_bundle_file@ @topology_manager_bundle_file@ @tst_bundle_file@
+LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+RSA_PORT=50881
+DISCOVERY_CFG_SERVER_PORT=50991
+DISCOVERY_CFG_POLL_ENDPOINTS=http://127.0.0.1:50992/org.apache.celix.discovery.configured
+org.osgi.framework.storage.clean=onFirstInit
+org.osgi.framework.storage=.cacheClient
+DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/config.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/config.properties.in b/remote_services/remote_service_admin_dfi/rsa_tst/config.properties.in
new file mode 100644
index 0000000..8412214
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/config.properties.in
@@ -0,0 +1,3 @@
+cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@
+LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+org.osgi.framework.storage.clean=onFirstInit
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/rsa_client_server_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/rsa_client_server_tests.cpp b/remote_services/remote_service_admin_dfi/rsa_tst/rsa_client_server_tests.cpp
new file mode 100644
index 0000000..35beffe
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/rsa_client_server_tests.cpp
@@ -0,0 +1,113 @@
+/*
+ * Licensed under Apache License v2. See LICENSE for more information.
+ */
+#include <CppUTest/TestHarness.h>
+#include <remote_constants.h>
+#include <constants.h>
+#include <tst_service.h>
+#include "CppUTest/CommandLineTestRunner.h"
+#include "../../examples/calculator_service/public/include/calculator_service.h"
+
+extern "C" {
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#include "launcher.h"
+#include "framework.h"
+#include "remote_service_admin.h"
+#include "calculator_service.h"
+
+    static framework_pt serverFramework = NULL;
+    static bundle_context_pt serverContext = NULL;
+
+    static framework_pt clientFramework = NULL;
+    static bundle_context_pt clientContext = NULL;
+
+    static void setupFm(void) {
+        int rc = 0;
+        bundle_pt bundle = NULL;
+
+        //server
+        rc = celixLauncher_launch("server.properties", &serverFramework);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        bundle = NULL;
+        rc = framework_getFrameworkBundle(serverFramework, &bundle);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundle_getContext(bundle, &serverContext);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+
+        //client
+        rc = celixLauncher_launch("client.properties", &clientFramework);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        bundle = NULL;
+        rc = framework_getFrameworkBundle(clientFramework, &bundle);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundle_getContext(bundle, &clientContext);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+    }
+
+    static void teardownFm(void) {
+        int rc = 0;
+
+        celixLauncher_stop(serverFramework);
+        celixLauncher_waitForShutdown(serverFramework);
+        celixLauncher_destroy(serverFramework);
+
+        celixLauncher_stop(clientFramework);
+        celixLauncher_waitForShutdown(clientFramework);
+        celixLauncher_destroy(clientFramework);
+
+        serverContext = NULL;
+        serverFramework = NULL;
+        clientContext = NULL;
+        clientFramework = NULL;
+    }
+
+    static void test1(void) {
+        int rc = 0;
+        service_reference_pt ref = NULL;
+        tst_service_pt tst = NULL;
+
+        usleep(2000000); //TODO use tracker
+
+        bundleContext_getServiceReference(clientContext, (char *)TST_SERVICE_NAME, &ref);
+        CHECK_EQUAL(0, rc);
+        CHECK(ref != NULL);
+
+        bundleContext_getService(clientContext, ref, (void **)&tst);
+        CHECK_EQUAL(0, rc);
+        CHECK(tst != NULL);
+
+        rc = tst->test(tst->handle);
+        CHECK_EQUAL(0, rc);
+
+        bundleContext_ungetService(clientContext, ref, NULL);
+        bundleContext_ungetServiceReference(clientContext, ref);
+    }
+
+}
+
+
+TEST_GROUP(RsaDfiClientServerTests) {
+    void setup() {
+        setupFm();
+    }
+
+    void teardown() {
+        teardownFm();
+    }
+};
+
+TEST(RsaDfiClientServerTests, Test1) {
+    test1();
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/rsa_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/rsa_tests.cpp b/remote_services/remote_service_admin_dfi/rsa_tst/rsa_tests.cpp
new file mode 100644
index 0000000..1384573
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/rsa_tests.cpp
@@ -0,0 +1,201 @@
+/*
+ * Licensed under Apache License v2. See LICENSE for more information.
+ */
+#include <CppUTest/TestHarness.h>
+#include <remote_constants.h>
+#include <constants.h>
+#include "CppUTest/CommandLineTestRunner.h"
+#include "../../examples/calculator_service/public/include/calculator_service.h"
+
+extern "C" {
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "launcher.h"
+#include "framework.h"
+#include "remote_service_admin.h"
+#include "calculator_service.h"
+
+
+    static framework_pt framework = NULL;
+    static bundle_context_pt context = NULL;
+
+    static service_reference_pt rsaRef = NULL;
+    static remote_service_admin_service_pt rsa = NULL;
+
+    static service_reference_pt calcRef = NULL;
+    static calculator_service_pt calc = NULL;
+
+    static void setupFm(void) {
+        int rc = 0;
+
+        rc = celixLauncher_launch("config.properties", &framework);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        bundle_pt bundle = NULL;
+        rc = framework_getFrameworkBundle(framework, &bundle);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundle_getContext(bundle, &context);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundleContext_getServiceReference(context, (char *)OSGI_RSA_REMOTE_SERVICE_ADMIN, &rsaRef);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK(rsaRef != NULL);
+
+        rc = bundleContext_getService(context, rsaRef, (void **)&rsa);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundleContext_getServiceReference(context, (char *)CALCULATOR2_SERVICE, &calcRef);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK(calcRef != NULL);
+
+        rc = bundleContext_getService(context, calcRef, (void **)&calc);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+    }
+
+    static void teardownFm(void) {
+        int rc = 0;
+        rc = bundleContext_ungetService(context, rsaRef, NULL);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = bundleContext_ungetService(context, calcRef, NULL);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        celixLauncher_stop(framework);
+        celixLauncher_waitForShutdown(framework);
+        celixLauncher_destroy(framework);
+
+        rsaRef = NULL;
+        rsa = NULL;
+        calcRef = NULL;
+        calc = NULL;
+        context = NULL;
+        framework = NULL;
+    }
+
+    static void testServices(void) {
+        int rc = 0;
+        array_list_pt exported = NULL;
+        array_list_pt imported = NULL;
+        arrayList_create(&exported);
+        arrayList_create(&imported);
+
+        rc = rsa->getExportedServices(rsa->admin, &exported);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK_EQUAL(0, arrayList_size(exported));
+
+        rc = rsa->getImportedEndpoints(rsa->admin, &imported);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK_EQUAL(0, arrayList_size(imported));
+
+        double result = 0;
+        rc = calc->add(calc->calculator, 2.0, 5.0, &result);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK_EQUAL(7.0, result);
+    }
+
+    static void testExportService(void) {
+        int rc = 0;
+        char *calcId = NULL;
+        array_list_pt regs = NULL;
+
+        rc = arrayList_create(&regs);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = serviceReference_getProperty(calcRef, (char *)"service.id", &calcId);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = rsa->exportService(rsa->admin, calcId, NULL, &regs);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        CHECK_EQUAL(1, arrayList_size(regs));
+    }
+
+    static void testImportService(void) {
+        int rc = 0;
+        import_registration_pt reg = NULL;
+        endpoint_description_pt endpoint = NULL;
+
+        properties_pt props = properties_create();
+        properties_set(props, (char *)OSGI_RSA_ENDPOINT_SERVICE_ID, (char *)"42");
+        properties_set(props, (char *)OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, (char *)"eec5404d-51d0-47ef-8d86-c825a8beda42");
+        properties_set(props, (char *)OSGI_RSA_ENDPOINT_ID, (char *)"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
+        properties_set(props, (char *)OSGI_FRAMEWORK_OBJECTCLASS,(char *)"org.apache.celix.Example");
+
+        rc = endpointDescription_create(props, &endpoint);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+
+        rc = rsa->importService(rsa->admin, endpoint, &reg);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK(reg != NULL);
+
+        service_reference_pt ref = NULL;
+        rc = bundleContext_getServiceReference(context, (char *)"org.apache.celix.Example", &ref);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK(ref != NULL);
+
+        /* Cannot test. uses requesting bundles descriptor
+        void *service = NULL;
+        rc = bundleContext_getService(context, ref, &service);
+        CHECK_EQUAL(CELIX_SUCCESS, rc);
+        CHECK(service != NULL);
+         */
+    }
+
+    static void testBundles(void) {
+        array_list_pt bundles = NULL;
+
+        int rc = bundleContext_getBundles(context, &bundles);
+        CHECK_EQUAL(0, rc);
+        CHECK_EQUAL(3, arrayList_size(bundles)); //framework, rsa_dfi & calc
+
+        /*
+        int size = arrayList_size(bundles);
+        int i;
+        for (i = 0; i < size; i += 1) {
+            bundle_pt bundle = NULL;
+            module_pt module = NULL;
+            char *name = NULL;
+
+            bundle = (bundle_pt) arrayList_get(bundles, i);
+            bundle_getCurrentModule(bundle, &module);
+            module_getSymbolicName(module, &name);
+            printf("got bundle with symbolic name '%s'", name);
+        }*/
+
+        arrayList_destroy(bundles);
+    }
+
+}
+
+
+TEST_GROUP(RsaDfiTests) {
+    void setup() {
+        setupFm();
+    }
+
+    void teardown() {
+        teardownFm();
+    }
+};
+
+TEST(RsaDfiTests, InfoTest) {
+    testServices();
+}
+
+TEST(RsaDfiTests, ExportService) {
+    testExportService();
+}
+
+TEST(RsaDfiTests, ImportService) {
+    testImportService();
+}
+
+TEST(RsaDfiTests, TestBundles) {
+    testBundles();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/run_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/run_tests.cpp b/remote_services/remote_service_admin_dfi/rsa_tst/run_tests.cpp
new file mode 100644
index 0000000..c5e960c
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/run_tests.cpp
@@ -0,0 +1,9 @@
+/*
+ * Licensed under Apache License v2. See LICENSE for more information.
+ */
+#include <CppUTest/TestHarness.h>
+#include "CppUTest/CommandLineTestRunner.h"
+
+int main(int argc, char** argv) {
+    return RUN_ALL_TESTS(argc, argv);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/rsa_tst/server.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/server.properties.in b/remote_services/remote_service_admin_dfi/rsa_tst/server.properties.in
new file mode 100644
index 0000000..ea02519
--- /dev/null
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/server.properties.in
@@ -0,0 +1,8 @@
+cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@ @discovery_configured_bundle_file@ @topology_manager_bundle_file@
+LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+RSA_PORT=50882
+DISCOVERY_CFG_SERVER_PORT=50992
+DISCOVERY_CFG_POLL_ENDPOINTS=http://127.0.0.1:50991/org.apache.celix.discovery.configured
+org.osgi.framework.storage.clean=onFirstInit
+org.osgi.framework.storage=.cacheServer
+DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/CMakeLists.txt b/remote_services/remote_service_admin_dfi/tst/CMakeLists.txt
deleted file mode 100644
index d21fb89..0000000
--- a/remote_services/remote_service_admin_dfi/tst/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Licensed under Apache License v2. See LICENSE for more information.
-#
-
-#TODO add FRAMEWORK_TEST / TEST check
-#if (RSA_EXAMPLES)
-
-    include_directories(
-        ${PROJECT_SOURCE_DIR}/launcher/public/include
-        ${CPPUTEST_INCLUDE_DIR}
-        ${PROJECT_SOURCE_DIR}/framework/public/include
-        ${PROJECT_SOURCE_DIR}/utils/public/include
-        bundle
-    )
-
-    SET(CMAKE_SKIP_BUILD_RPATH  FALSE) #TODO needed?
-    SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #TODO needed?
-    SET(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/framework" "${PROJECT_BINARY_DIR}/utils")
-
-    add_executable(test_rsa_dfi
-        run_tests.cpp
-        rsa_tests.cpp
-        rsa_client_server_tests.cpp
-
-        ${PROJECT_SOURCE_DIR}/launcher/private/src/launcher.c #TODO move to libframework
-        ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c
-    )
-    target_link_libraries(test_rsa_dfi celix_framework celix_utils ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY})
-
-    get_property(rsa_bundle_file TARGET remote_service_admin_dfi PROPERTY BUNDLE)
-    get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
-    get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE)
-    get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE)
-    get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
-    get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE)
-
-    configure_file(config.properties.in config.properties @ONLY)
-    configure_file(client.properties.in client.properties @ONLY)
-    configure_file(server.properties.in server.properties @ONLY)
-
-    add_dependencies(test_rsa_dfi remote_service_admin_dfi calculator)
-
-
-    add_test(NAME run_test_rsa_dfi COMMAND test_rsa_dfi)
-    SETUP_TARGET_FOR_COVERAGE(test_rsa_dfi_cov test_rsa_dfi ${CMAKE_BINARY_DIR}/coverage/rsa_dfi)
-
-#endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/tst/bundle/CMakeLists.txt
deleted file mode 100644
index b91ebf1..0000000
--- a/remote_services/remote_service_admin_dfi/tst/bundle/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Licensed under Apache License v2. See LICENSE for more information.
-#
-
-include_directories(
-        ${PROJECT_SOURCE_DIR}/launcher/public/include
-        ${CPPUTEST_INCLUDE_DIR}
-        ${PROJECT_SOURCE_DIR}/framework/public/include
-        ${PROJECT_SOURCE_DIR}/utils/public/include
-        ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
-)
-
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_dfi_tst_bundle")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin DFI test bundle")
-
-
-bundle(rsa_dfi_tst_bundle
-    SOURCES
-        tst_activator.c
-
-    FILES
-        ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
-)
-target_link_libraries(rsa_dfi_tst_bundle ${CPPUTEST_LIBRARY} celix_framework celix_utils)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/bundle/tst_activator.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/bundle/tst_activator.c b/remote_services/remote_service_admin_dfi/tst/bundle/tst_activator.c
deleted file mode 100644
index 728030e..0000000
--- a/remote_services/remote_service_admin_dfi/tst/bundle/tst_activator.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed under Apache License v2. See LICENSE for more information.
- */
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <service_tracker_customizer.h>
-#include <service_tracker.h>
-
-#include "bundle_activator.h"
-#include "bundle_context.h"
-#include "service_registration.h"
-#include "service_reference.h"
-#include "celix_errno.h"
-
-#include "tst_service.h"
-#include "calculator_service.h"
-
-
-struct activator {
-	bundle_context_pt context;
-	struct tst_service serv;
-	service_registration_pt  reg;
-
-	service_tracker_customizer_pt cust;
-	service_tracker_pt tracker;
-	calculator_service_pt calc;
-};
-
-static celix_status_t addCalc(void * handle, service_reference_pt reference, void * service);
-static celix_status_t removeCalc(void * handle, service_reference_pt reference, void * service);
-static int test(void *handle);
-
-celix_status_t bundleActivator_create(bundle_context_pt context, void **out) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *act = calloc(1, sizeof(*act));
-	if (act != NULL) {
-		act->context = context;
-		act->serv.handle = act;
-		act->serv.test = test;
-
-		status = serviceTrackerCustomizer_create(act, NULL, addCalc, NULL, removeCalc, &act->cust);
-		status = CELIX_DO_IF(status, serviceTracker_create(context, CALCULATOR2_SERVICE, act->cust, &act->tracker));
-
-	} else {
-		status = CELIX_ENOMEM;
-	}
-
-	if (status == CELIX_SUCCESS) {
-		*out = act;
-	} else if (act != NULL) {
-		if (act->cust != NULL) {
-			free(act->cust);
-			act->cust = NULL;
-		}
-		if (act->tracker != NULL) {
-			serviceTracker_destroy(act->tracker);
-			act->tracker = NULL;
-		}
-		free(act);
-	}
-
-	return CELIX_SUCCESS;
-}
-
-static celix_status_t addCalc(void * handle, service_reference_pt reference, void * service) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator * act = handle;
-	act->calc = service;
-	return status;
-}
-
-static celix_status_t removeCalc(void * handle, service_reference_pt reference, void * service) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator * act = handle;
-	if (act->calc == service) {
-		act->calc = NULL;
-	}
-	return status;
-
-}
-
-celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
-    celix_status_t status = CELIX_SUCCESS;
-	struct activator * act = userData;
-
-	act->reg = NULL;
-	status = bundleContext_registerService(context, (char *)TST_SERVICE_NAME, &act->serv, NULL, &act->reg);
-
-	status = CELIX_DO_IF(status, serviceTracker_open(act->tracker));
-
-
-	return status;
-}
-
-
-celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
-    celix_status_t status = CELIX_SUCCESS;
-	struct activator * act = userData;
-
-	status = serviceRegistration_unregister(act->reg);
-	status = CELIX_DO_IF(status, serviceTracker_close(act->tracker));
-
-	return status;
-}
-
-celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
-	struct activator *act = userData;
-	if (act != NULL) {
-		if (act->tracker != NULL) {
-			serviceTracker_destroy(act->tracker);
-			act->tracker = NULL;
-		}
-		free(act);
-	}
-	return CELIX_SUCCESS;
-}
-
-static int test(void *handle) {
-	int status = 0;
-	struct activator *act = handle;
-
-	double result = 0.0;
-
-    int rc;
-    if (act->calc != NULL) {
-         rc = act->calc->sqrt(act->calc->calculator, 4, &result);
-        printf("calc result is %d\n", result);
-    } else {
-        printf("calc not ready\n");
-    }
-
-	if (rc != 0 || result != 2.0) {
-		status = 1;
-	}
-	return status;
-}

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/bundle/tst_service.h
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/bundle/tst_service.h b/remote_services/remote_service_admin_dfi/tst/bundle/tst_service.h
deleted file mode 100644
index 2678b0c..0000000
--- a/remote_services/remote_service_admin_dfi/tst/bundle/tst_service.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Licensed under Apache License v2. See LICENSE for more information.
- */
-
-#ifndef CELIX_TST_SERVICE_H
-#define CELIX_TST_SERVICE_H
-
-#define TST_SERVICE_NAME "tst_service"
-
-struct tst_service {
-    void *handle;
-    int (*test)(void *handle);
-};
-
-typedef struct tst_service *tst_service_pt;
-
-#endif //CELIX_TST_SERVICE_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/client.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/client.properties.in b/remote_services/remote_service_admin_dfi/tst/client.properties.in
deleted file mode 100644
index a9a06fb..0000000
--- a/remote_services/remote_service_admin_dfi/tst/client.properties.in
+++ /dev/null
@@ -1,8 +0,0 @@
-cosgi.auto.start.1=@rsa_bundle_file@ @calculator_shell_bundle_file@ @discovery_configured_bundle_file@ @topology_manager_bundle_file@ @tst_bundle_file@
-LOGHELPER_ENABLE_STDOUT_FALLBACK=true
-RSA_PORT=50881
-DISCOVERY_CFG_SERVER_PORT=50991
-DISCOVERY_CFG_POLL_ENDPOINTS=http://127.0.0.1:50992/org.apache.celix.discovery.configured
-org.osgi.framework.storage.clean=onFirstInit
-org.osgi.framework.storage=.cacheClient
-DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/config.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/config.properties.in b/remote_services/remote_service_admin_dfi/tst/config.properties.in
deleted file mode 100644
index 8412214..0000000
--- a/remote_services/remote_service_admin_dfi/tst/config.properties.in
+++ /dev/null
@@ -1,3 +0,0 @@
-cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@
-LOGHELPER_ENABLE_STDOUT_FALLBACK=true
-org.osgi.framework.storage.clean=onFirstInit
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/rsa_client_server_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/rsa_client_server_tests.cpp b/remote_services/remote_service_admin_dfi/tst/rsa_client_server_tests.cpp
deleted file mode 100644
index 35beffe..0000000
--- a/remote_services/remote_service_admin_dfi/tst/rsa_client_server_tests.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed under Apache License v2. See LICENSE for more information.
- */
-#include <CppUTest/TestHarness.h>
-#include <remote_constants.h>
-#include <constants.h>
-#include <tst_service.h>
-#include "CppUTest/CommandLineTestRunner.h"
-#include "../../examples/calculator_service/public/include/calculator_service.h"
-
-extern "C" {
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-
-#include "launcher.h"
-#include "framework.h"
-#include "remote_service_admin.h"
-#include "calculator_service.h"
-
-    static framework_pt serverFramework = NULL;
-    static bundle_context_pt serverContext = NULL;
-
-    static framework_pt clientFramework = NULL;
-    static bundle_context_pt clientContext = NULL;
-
-    static void setupFm(void) {
-        int rc = 0;
-        bundle_pt bundle = NULL;
-
-        //server
-        rc = celixLauncher_launch("server.properties", &serverFramework);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        bundle = NULL;
-        rc = framework_getFrameworkBundle(serverFramework, &bundle);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundle_getContext(bundle, &serverContext);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-
-        //client
-        rc = celixLauncher_launch("client.properties", &clientFramework);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        bundle = NULL;
-        rc = framework_getFrameworkBundle(clientFramework, &bundle);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundle_getContext(bundle, &clientContext);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-    }
-
-    static void teardownFm(void) {
-        int rc = 0;
-
-        celixLauncher_stop(serverFramework);
-        celixLauncher_waitForShutdown(serverFramework);
-        celixLauncher_destroy(serverFramework);
-
-        celixLauncher_stop(clientFramework);
-        celixLauncher_waitForShutdown(clientFramework);
-        celixLauncher_destroy(clientFramework);
-
-        serverContext = NULL;
-        serverFramework = NULL;
-        clientContext = NULL;
-        clientFramework = NULL;
-    }
-
-    static void test1(void) {
-        int rc = 0;
-        service_reference_pt ref = NULL;
-        tst_service_pt tst = NULL;
-
-        usleep(2000000); //TODO use tracker
-
-        bundleContext_getServiceReference(clientContext, (char *)TST_SERVICE_NAME, &ref);
-        CHECK_EQUAL(0, rc);
-        CHECK(ref != NULL);
-
-        bundleContext_getService(clientContext, ref, (void **)&tst);
-        CHECK_EQUAL(0, rc);
-        CHECK(tst != NULL);
-
-        rc = tst->test(tst->handle);
-        CHECK_EQUAL(0, rc);
-
-        bundleContext_ungetService(clientContext, ref, NULL);
-        bundleContext_ungetServiceReference(clientContext, ref);
-    }
-
-}
-
-
-TEST_GROUP(RsaDfiClientServerTests) {
-    void setup() {
-        setupFm();
-    }
-
-    void teardown() {
-        teardownFm();
-    }
-};
-
-TEST(RsaDfiClientServerTests, Test1) {
-    test1();
-}

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/rsa_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/rsa_tests.cpp b/remote_services/remote_service_admin_dfi/tst/rsa_tests.cpp
deleted file mode 100644
index 1384573..0000000
--- a/remote_services/remote_service_admin_dfi/tst/rsa_tests.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed under Apache License v2. See LICENSE for more information.
- */
-#include <CppUTest/TestHarness.h>
-#include <remote_constants.h>
-#include <constants.h>
-#include "CppUTest/CommandLineTestRunner.h"
-#include "../../examples/calculator_service/public/include/calculator_service.h"
-
-extern "C" {
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "launcher.h"
-#include "framework.h"
-#include "remote_service_admin.h"
-#include "calculator_service.h"
-
-
-    static framework_pt framework = NULL;
-    static bundle_context_pt context = NULL;
-
-    static service_reference_pt rsaRef = NULL;
-    static remote_service_admin_service_pt rsa = NULL;
-
-    static service_reference_pt calcRef = NULL;
-    static calculator_service_pt calc = NULL;
-
-    static void setupFm(void) {
-        int rc = 0;
-
-        rc = celixLauncher_launch("config.properties", &framework);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        bundle_pt bundle = NULL;
-        rc = framework_getFrameworkBundle(framework, &bundle);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundle_getContext(bundle, &context);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundleContext_getServiceReference(context, (char *)OSGI_RSA_REMOTE_SERVICE_ADMIN, &rsaRef);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK(rsaRef != NULL);
-
-        rc = bundleContext_getService(context, rsaRef, (void **)&rsa);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundleContext_getServiceReference(context, (char *)CALCULATOR2_SERVICE, &calcRef);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK(calcRef != NULL);
-
-        rc = bundleContext_getService(context, calcRef, (void **)&calc);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-    }
-
-    static void teardownFm(void) {
-        int rc = 0;
-        rc = bundleContext_ungetService(context, rsaRef, NULL);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = bundleContext_ungetService(context, calcRef, NULL);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        celixLauncher_stop(framework);
-        celixLauncher_waitForShutdown(framework);
-        celixLauncher_destroy(framework);
-
-        rsaRef = NULL;
-        rsa = NULL;
-        calcRef = NULL;
-        calc = NULL;
-        context = NULL;
-        framework = NULL;
-    }
-
-    static void testServices(void) {
-        int rc = 0;
-        array_list_pt exported = NULL;
-        array_list_pt imported = NULL;
-        arrayList_create(&exported);
-        arrayList_create(&imported);
-
-        rc = rsa->getExportedServices(rsa->admin, &exported);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK_EQUAL(0, arrayList_size(exported));
-
-        rc = rsa->getImportedEndpoints(rsa->admin, &imported);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK_EQUAL(0, arrayList_size(imported));
-
-        double result = 0;
-        rc = calc->add(calc->calculator, 2.0, 5.0, &result);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK_EQUAL(7.0, result);
-    }
-
-    static void testExportService(void) {
-        int rc = 0;
-        char *calcId = NULL;
-        array_list_pt regs = NULL;
-
-        rc = arrayList_create(&regs);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = serviceReference_getProperty(calcRef, (char *)"service.id", &calcId);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = rsa->exportService(rsa->admin, calcId, NULL, &regs);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        CHECK_EQUAL(1, arrayList_size(regs));
-    }
-
-    static void testImportService(void) {
-        int rc = 0;
-        import_registration_pt reg = NULL;
-        endpoint_description_pt endpoint = NULL;
-
-        properties_pt props = properties_create();
-        properties_set(props, (char *)OSGI_RSA_ENDPOINT_SERVICE_ID, (char *)"42");
-        properties_set(props, (char *)OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, (char *)"eec5404d-51d0-47ef-8d86-c825a8beda42");
-        properties_set(props, (char *)OSGI_RSA_ENDPOINT_ID, (char *)"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
-        properties_set(props, (char *)OSGI_FRAMEWORK_OBJECTCLASS,(char *)"org.apache.celix.Example");
-
-        rc = endpointDescription_create(props, &endpoint);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-
-        rc = rsa->importService(rsa->admin, endpoint, &reg);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK(reg != NULL);
-
-        service_reference_pt ref = NULL;
-        rc = bundleContext_getServiceReference(context, (char *)"org.apache.celix.Example", &ref);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK(ref != NULL);
-
-        /* Cannot test. uses requesting bundles descriptor
-        void *service = NULL;
-        rc = bundleContext_getService(context, ref, &service);
-        CHECK_EQUAL(CELIX_SUCCESS, rc);
-        CHECK(service != NULL);
-         */
-    }
-
-    static void testBundles(void) {
-        array_list_pt bundles = NULL;
-
-        int rc = bundleContext_getBundles(context, &bundles);
-        CHECK_EQUAL(0, rc);
-        CHECK_EQUAL(3, arrayList_size(bundles)); //framework, rsa_dfi & calc
-
-        /*
-        int size = arrayList_size(bundles);
-        int i;
-        for (i = 0; i < size; i += 1) {
-            bundle_pt bundle = NULL;
-            module_pt module = NULL;
-            char *name = NULL;
-
-            bundle = (bundle_pt) arrayList_get(bundles, i);
-            bundle_getCurrentModule(bundle, &module);
-            module_getSymbolicName(module, &name);
-            printf("got bundle with symbolic name '%s'", name);
-        }*/
-
-        arrayList_destroy(bundles);
-    }
-
-}
-
-
-TEST_GROUP(RsaDfiTests) {
-    void setup() {
-        setupFm();
-    }
-
-    void teardown() {
-        teardownFm();
-    }
-};
-
-TEST(RsaDfiTests, InfoTest) {
-    testServices();
-}
-
-TEST(RsaDfiTests, ExportService) {
-    testExportService();
-}
-
-TEST(RsaDfiTests, ImportService) {
-    testImportService();
-}
-
-TEST(RsaDfiTests, TestBundles) {
-    testBundles();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/run_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/run_tests.cpp b/remote_services/remote_service_admin_dfi/tst/run_tests.cpp
deleted file mode 100644
index c5e960c..0000000
--- a/remote_services/remote_service_admin_dfi/tst/run_tests.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Licensed under Apache License v2. See LICENSE for more information.
- */
-#include <CppUTest/TestHarness.h>
-#include "CppUTest/CommandLineTestRunner.h"
-
-int main(int argc, char** argv) {
-    return RUN_ALL_TESTS(argc, argv);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/remote_service_admin_dfi/tst/server.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/tst/server.properties.in b/remote_services/remote_service_admin_dfi/tst/server.properties.in
deleted file mode 100644
index ea02519..0000000
--- a/remote_services/remote_service_admin_dfi/tst/server.properties.in
+++ /dev/null
@@ -1,8 +0,0 @@
-cosgi.auto.start.1=@rsa_bundle_file@ @calc_bundle_file@ @discovery_configured_bundle_file@ @topology_manager_bundle_file@
-LOGHELPER_ENABLE_STDOUT_FALLBACK=true
-RSA_PORT=50882
-DISCOVERY_CFG_SERVER_PORT=50992
-DISCOVERY_CFG_POLL_ENDPOINTS=http://127.0.0.1:50991/org.apache.celix.discovery.configured
-org.osgi.framework.storage.clean=onFirstInit
-org.osgi.framework.storage=.cacheServer
-DISCOVERY_CFG_POLL_INTERVAL=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a129b488/remote_services/utils/public/include/remote_constants.h
----------------------------------------------------------------------
diff --git a/remote_services/utils/public/include/remote_constants.h b/remote_services/utils/public/include/remote_constants.h
deleted file mode 100644
index 0736685..0000000
--- a/remote_services/utils/public/include/remote_constants.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-/*
- * remote_constants.h
- *
- *  \date       Sep 30, 2011
- *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
- *  \copyright	Apache License, Version 2.0
- */
-
-#ifndef REMOTE_CONSTANTS_H_
-#define REMOTE_CONSTANTS_H_
-
-static const char * const OSGI_RSA_SERVICE_EXPORTED_INTERFACES = "service.exported.interfaces";
-static const char * const OSGI_RSA_ENDPOINT_FRAMEWORK_UUID = "endpoint.framework.uuid";
-static const char * const OSGI_RSA_ENDPOINT_SERVICE_ID = "endpoint.service.id";
-static const char * const OSGI_RSA_ENDPOINT_ID = "endpoint.id";
-static const char * const OSGI_RSA_SERVICE_IMPORTED = "service.imported";
-static const char * const OSGI_RSA_SERVICE_IMPORTED_CONFIGS = "service.imported.configs";
-static const char * const OSGI_RSA_SERVICE_LOCATION = "service.location";
-
-#endif /* REMOTE_CONSTANTS_H_ */