Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-12-16 12:09:41 -0500
committerAngel Avila2014-12-16 12:09:41 -0500
commit38c265129509f4ab6f74188eac3629de511948d9 (patch)
tree29a5105f8610462d3e523322d96a736b254c1d78 /plugins/org.eclipse.osee.x.server.integration.tests
parent13cf791fbf9c5802f833cea733f18fdce735fbd8 (diff)
downloadorg.eclipse.osee-38c265129509f4ab6f74188eac3629de511948d9.tar.gz
org.eclipse.osee-38c265129509f4ab6f74188eac3629de511948d9.tar.xz
org.eclipse.osee-38c265129509f4ab6f74188eac3629de511948d9.zip
feature[ats_ATS139148]: Add ATS Search by Legacy PCR ID
Diffstat (limited to 'plugins/org.eclipse.osee.x.server.integration.tests')
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ServerIntegrationTestSuite.java3
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ats/AtsActionEndpointTest.java45
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java1
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/OseeClientQueryTest.java1
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java (renamed from plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/IntegrationUtil.java)16
6 files changed, 67 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.x.server.integration.tests/META-INF/MANIFEST.MF
index 40048a0494..4e6428d392 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,8 @@ Bundle-SymbolicName: org.eclipse.osee.x.server.integration.tests
Bundle-Version: 0.20.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: Eclipse Open System Engineering Environment
-Import-Package: org.apache.commons.lang.math,
+Import-Package: javax.ws.rs.core;version="2.0.0",
+ org.apache.commons.lang.math,
org.databene.contiperf,
org.databene.contiperf.junit,
org.databene.contiperf.report,
@@ -24,3 +25,4 @@ Import-Package: org.apache.commons.lang.math,
org.junit.rules,
org.junit.runner,
org.junit.runners
+Require-Bundle: org.eclipse.osee.ats.api;bundle-version="0.20.0"
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ServerIntegrationTestSuite.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ServerIntegrationTestSuite.java
index 7ffe074724..80ed3c4ed4 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ServerIntegrationTestSuite.java
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ServerIntegrationTestSuite.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.osee.x.server.integration.tests;
+import org.eclipse.osee.x.server.integration.tests.ats.AtsActionEndpointTest;
import org.eclipse.osee.x.server.integration.tests.performance.AccountClientTest;
import org.eclipse.osee.x.server.integration.tests.performance.OseeClientQueryTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({OseeClientQueryTest.class, AccountClientTest.class})
+@Suite.SuiteClasses({AtsActionEndpointTest.class, OseeClientQueryTest.class, AccountClientTest.class})
public class ServerIntegrationTestSuite {
// Test Suite
}
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ats/AtsActionEndpointTest.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ats/AtsActionEndpointTest.java
new file mode 100644
index 0000000000..56344d7ba4
--- /dev/null
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/ats/AtsActionEndpointTest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.x.server.integration.tests.ats;
+
+import org.eclipse.osee.ats.api.workflow.AtsActionEndpointApi;
+import org.eclipse.osee.x.server.integration.tests.util.IntegrationUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.MethodRule;
+import org.junit.rules.TestName;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsActionEndpointTest {
+
+ @Rule
+ public MethodRule performanceRule = IntegrationUtil.createPerformanceRule();
+
+ @Rule
+ public TestName testName = new TestName();
+
+ private AtsActionEndpointApi actionEndpoint;
+
+ @Before
+ public void setUp() {
+ actionEndpoint = IntegrationUtil.createAtsClient().getAction();
+ }
+
+ @Test
+ public void testEndpointAlive() throws Exception {
+ Assert.assertTrue(actionEndpoint.get().contains("Action Resource"));
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java
index d8ff687520..ee7cea4d32 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.account.rest.model.AccountInput;
import org.eclipse.osee.account.rest.model.AccountPreferencesData;
import org.eclipse.osee.account.rest.model.AccountSessionData;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
+import org.eclipse.osee.x.server.integration.tests.util.IntegrationUtil;
import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Rule;
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/OseeClientQueryTest.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/OseeClientQueryTest.java
index eb045010a2..8015639ff3 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/OseeClientQueryTest.java
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/OseeClientQueryTest.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.rest.client.OseeClient;
import org.eclipse.osee.orcs.rest.model.search.artifact.RequestType;
import org.eclipse.osee.orcs.rest.model.search.artifact.SearchResult;
+import org.eclipse.osee.x.server.integration.tests.util.IntegrationUtil;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/IntegrationUtil.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java
index 68758e1a3d..5691b43f77 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/IntegrationUtil.java
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.x.server.integration.tests.performance;
+package org.eclipse.osee.x.server.integration.tests.util;
import java.util.HashMap;
import java.util.Map;
@@ -18,6 +18,8 @@ import org.databene.contiperf.report.CSVSummaryReportModule;
import org.databene.contiperf.report.HtmlReportModule;
import org.eclipse.osee.account.rest.client.AccountClient;
import org.eclipse.osee.account.rest.client.AccountClientStandaloneSetup;
+import org.eclipse.osee.ats.api.AtsJaxRsApi;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.orcs.rest.client.OseeClient;
import org.eclipse.osee.orcs.rest.client.OseeClientStandaloneSetup;
import org.junit.rules.MethodRule;
@@ -52,4 +54,16 @@ public final class IntegrationUtil {
return AccountClientStandaloneSetup.createClient(config);
}
+ public static AtsJaxRsApi createAtsClient() {
+ Map<String, Object> properties = createClientConfig();
+ String address = properties != null ? (String) properties.get(OSEE_APPLICATION_SERVER) : null;
+ String atsUri = String.format("%s/ats", address);
+
+ AtsJaxRsApi atsEndpoint = JaxRsClient.newBuilder() //
+ .createThreadSafeProxyClients(true) // if the client needs to be shared between threads
+ .build() //
+ .targetProxy(atsUri, AtsJaxRsApi.class);
+
+ return atsEndpoint;
+ }
}

Back to the top