You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2022/08/20 15:51:59 UTC

[submarine] branch master updated: SUBMARINE-1305. Fix submarine-server-core test error

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

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 3feaeff6 SUBMARINE-1305. Fix submarine-server-core test error
3feaeff6 is described below

commit 3feaeff6b160cfc314276caf01e66dc70c5b2ab9
Author: cdmikechen <cd...@hotmail.com>
AuthorDate: Fri Aug 12 21:01:09 2022 +0800

    SUBMARINE-1305. Fix submarine-server-core test error
    
    ### What is this PR for?
    Currently, the test case class `SubmarineAuthSimpleTest` in `submarine-server-core` does not reset `submarine.auth.type` to `none` at the end (After), which will cause subsequent test cases to be blocked.
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    * [x] - Reset `submarine.auth.type` to `none` after test passed.
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1305
    
    ### How should this be tested?
    Have fixed.
    
    ### Screenshots (if appropriate)
    No
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: cdmikechen <cd...@hotmail.com>
    
    Signed-off-by: Kevin <pi...@apache.org>
    
    Closes #987 from cdmikechen/SUBMARINE-1305 and squashes the following commits:
    
    c1c055ff [cdmikechen] Rest submarine.auth.type to none at @After
---
 .../apache/submarine/server/security/SubmarineAuthSimpleTest.java   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/submarine-server/server-core/src/test/java/org/apache/submarine/server/security/SubmarineAuthSimpleTest.java b/submarine-server/server-core/src/test/java/org/apache/submarine/server/security/SubmarineAuthSimpleTest.java
index b86b7b52..284362f4 100644
--- a/submarine-server/server-core/src/test/java/org/apache/submarine/server/security/SubmarineAuthSimpleTest.java
+++ b/submarine-server/server-core/src/test/java/org/apache/submarine/server/security/SubmarineAuthSimpleTest.java
@@ -32,6 +32,7 @@ import org.apache.submarine.server.security.simple.SimpleFilter;
 import org.apache.submarine.server.utils.gson.EnvironmentIdDeserializer;
 import org.apache.submarine.server.utils.gson.EnvironmentIdSerializer;
 import org.apache.submarine.server.utils.response.JsonResponse;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -143,4 +144,9 @@ public class SubmarineAuthSimpleTest {
     assertNotNull(mockRequest.getAttribute(Pac4jConstants.USER_PROFILES));
   }
 
+  @After
+  public void after() {
+    conf.updateConfiguration("submarine.auth.type", "none");
+  }
+
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org