You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/01/18 03:50:59 UTC

[iotdb] branch Fix_openid_ut created (now 1198a2cef0)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a change to branch Fix_openid_ut
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 1198a2cef0 Fix files with unapporved license error after running OpenIdAuthorizerTest

This branch includes the following new commits:

     new 1198a2cef0 Fix files with unapporved license error after running OpenIdAuthorizerTest

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Fix files with unapporved license error after running OpenIdAuthorizerTest

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch Fix_openid_ut
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 1198a2cef0fad4e22497b3ee81c8dc02521fbc36
Author: HTHou <hh...@outlook.com>
AuthorDate: Wed Jan 18 11:50:11 2023 +0800

    Fix files with unapporved license error after running OpenIdAuthorizerTest
---
 .../iotdb/db/auth/authorizer/OpenIdAuthorizerTest.java   | 16 +++++++++++++++-
 server/src/test/resources/iotdb-datanode.properties      |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/server/src/test/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizerTest.java b/server/src/test/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizerTest.java
index c6b1e6f28f..bd0c2d399e 100644
--- a/server/src/test/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizerTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/auth/authorizer/OpenIdAuthorizerTest.java
@@ -22,9 +22,12 @@ import org.apache.iotdb.commons.auth.AuthException;
 import org.apache.iotdb.commons.auth.authorizer.OpenIdAuthorizer;
 import org.apache.iotdb.commons.conf.CommonConfig;
 import org.apache.iotdb.commons.conf.CommonDescriptor;
+import org.apache.iotdb.db.utils.EnvironmentUtils;
 
 import com.nimbusds.oauth2.sdk.ParseException;
 import com.nimbusds.oauth2.sdk.util.JSONObjectUtils;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -38,7 +41,18 @@ public class OpenIdAuthorizerTest {
 
   private static final String OPEN_ID_PUBLIC_JWK =
       "{\"kty\":\"RSA\",\"x5t#S256\":\"TZFbbj6HsRU28HYvrcVnDs03KreV3DE24-Cxb9EPdS4\",\"e\":\"AQAB\",\"use\":\"sig\",\"x5t\":\"l_N2UlC_a624iu5eYFypnB1Wr20\",\"kid\":\"q1-Wm0ozQ5O0mQH8-SJap2ZcN4MmucWwnQWKYxZJ4ow\",\"x5c\":[\"MIICmTCCAYECBgFyRdXW2DANBgkqhkiG9w0BAQsFADAQMQ4wDAYDVQQDDAVJb1REQjAeFw0yMDA1MjQwODM3MjJaFw0zMDA1MjQwODM5MDJaMBAxDjAMBgNVBAMMBUlvVERCMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAozDCZTVc9946VvhZ6E\\/OP8Yx6tJe0i9GR2Q9jR9S3jQoo0haT\\/P1b\\/zvQK52qA1xj6tBVg64xl3+LUxtCvh3HfA [...]
-  private static final CommonConfig config = CommonDescriptor.getInstance().getConfig();
+  private static CommonConfig config;
+
+  @Before
+  public void setUp() throws Exception {
+    EnvironmentUtils.envSetUp();
+    config = CommonDescriptor.getInstance().getConfig();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    EnvironmentUtils.cleanEnv();
+  }
 
   @Test
   public void loginWithJWT() throws AuthException, ParseException {
diff --git a/server/src/test/resources/iotdb-datanode.properties b/server/src/test/resources/iotdb-datanode.properties
index 909a83e684..2f1b5cd9b4 100644
--- a/server/src/test/resources/iotdb-datanode.properties
+++ b/server/src/test/resources/iotdb-datanode.properties
@@ -25,4 +25,4 @@ dn_tracing_dir=target/data/tracing
 minimum_schema_file_segment_in_bytes=0
 page_cache_in_schema_file=10
 dn_internal_address=0.0.0.0
-sync_dir=target/sync
+dn_sync_dir=target/sync