Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#629 #630

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions oxd-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<properties>
<dbcp.version>1.4</dbcp.version>
<h2.version>2.1.210</h2.version>
<dropwizard.version>2.0.29</dropwizard.version>
<dropwizard.version>3.0.0</dropwizard.version>
<jersey-test-framework-provider>2.29.1</jersey-test-framework-provider>
<generate.windows.exe>false</generate.windows.exe>
<commons-daemon.bin.version>1.2.1</commons-daemon.bin.version>
Expand Down Expand Up @@ -275,11 +275,23 @@
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-bom</artifactId>
<artifactId>dropwizard-dependencies</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>1.19.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
Expand Down Expand Up @@ -602,9 +614,7 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>


<!-- selenium dependencies-->
<!-- selenium dependencies-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion oxd-server/src/main/java/org/gluu/oxd/server/Cli.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import io.dropwizard.configuration.ConfigurationException;
import io.dropwizard.configuration.ConfigurationFactory;
import io.dropwizard.configuration.DefaultConfigurationFactoryFactory;
import io.dropwizard.core.server.DefaultServerFactory;
import io.dropwizard.jackson.Jackson;
import io.dropwizard.jersey.validation.Validators;
import io.dropwizard.jetty.ConnectorFactory;
import io.dropwizard.jetty.HttpConnectorFactory;
import io.dropwizard.jetty.HttpsConnectorFactory;
import io.dropwizard.server.DefaultServerFactory;
import org.apache.commons.cli.*;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.gluu.oxd.server;

import com.codahale.metrics.health.HealthCheck;
import io.dropwizard.Application;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.dropwizard.core.Application;
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
import org.glassfish.jersey.server.filter.RolesAllowedDynamicFeature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.collect.Lists;
import io.dropwizard.Configuration;
import io.dropwizard.core.Configuration;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.gluu.oxd.server;

import io.dropwizard.util.Strings;
import com.google.common.base.Strings;
import io.opentracing.Scope;
import org.gluu.oxd.common.Command;
import org.gluu.oxd.common.CommandType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.gluu.oxd.server.op;

import com.google.common.base.Strings;
import com.google.inject.Injector;
import io.dropwizard.util.Strings;
import org.gluu.oxd.common.Command;
import org.gluu.oxd.common.ErrorResponseCode;
import org.gluu.oxd.common.ExpiredObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.gluu.oxd.server;

import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import io.dropwizard.util.Strings;
import org.apache.commons.codec.binary.Base64;
import org.gluu.oxauth.model.common.AuthenticationMethod;
import org.gluu.oxauth.model.util.Util;
Expand Down
12 changes: 6 additions & 6 deletions oxd-server/src/test/java/org/gluu/oxd/server/SetUpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ public class SetUpTest {
@BeforeSuite
public static void beforeSuite(String host, String opHost, String redirectUrls) {
try {
LOG.debug("Running beforeSuite ...");
LOG.info("Running beforeSuite ...");
ServerLauncher.setSetUpSuite(true);

SUPPORT = new DropwizardTestSupport<OxdServerConfiguration>(OxdServerApplication.class,
ResourceHelpers.resourceFilePath("oxd-server-jenkins.yml"),
ConfigOverride.config("server.applicationConnectors[0].port", "0") // Optional, if not using a separate testing-specific configuration file, use a randomly selected port
);
SUPPORT.before();
LOG.debug("HTTP server started.");
LOG.info("HTTP server started.");

removeExistingRps();
LOG.debug("Existing RPs are removed.");
LOG.info("Existing RPs are removed.");

RegisterSiteResponse setupClient = SetupClientTest.setupClient(Tester.newClient(host), opHost, redirectUrls);
Tester.setSetupClient(setupClient, host, opHost);
LOG.debug("SETUP_CLIENT is set in Tester.");
LOG.info("SETUP_CLIENT is set in Tester.");

Preconditions.checkNotNull(Tester.getAuthorization());
LOG.debug("Tester's authorization is set.");
LOG.info("Tester's authorization is set.");

setupSwaggerSuite(Tester.getTargetHost(host), opHost, redirectUrls);
LOG.debug("Finished beforeSuite!");
LOG.info("Finished beforeSuite!");
} catch (Exception e) {
LOG.error("Failed to start suite.", e);
throw new AssertionError("Failed to start suite.");
Expand Down
Loading