forked from sofastack/sofa-serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ColdClear
committed
Sep 14, 2023
1 parent
77b7075
commit bf47eef
Showing
12 changed files
with
130 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...-core/src/test/java/com/alipay/sofa/serverless/arklet/core/command/HealthHandlerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.alipay.sofa.serverless.arklet.core.command; | ||
|
||
import com.alipay.sofa.serverless.arklet.core.BaseTest; | ||
import com.alipay.sofa.serverless.arklet.core.command.builtin.BuiltinCommand; | ||
import com.alipay.sofa.serverless.arklet.core.command.builtin.handler.HealthHandler; | ||
import com.alipay.sofa.serverless.arklet.core.command.builtin.handler.HealthHandler.Input; | ||
import com.alipay.sofa.serverless.arklet.core.common.exception.CommandValidationException; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author lunarscave | ||
*/ | ||
public class HealthHandlerTest extends BaseTest { | ||
|
||
private void testValidate(Input input) throws CommandValidationException{ | ||
HealthHandler handler = (HealthHandler) commandService.getHandler(BuiltinCommand.HEALTH); | ||
handler.validate(input); | ||
} | ||
|
||
@Test(expected = CommandValidationException.class) | ||
public void testValidate_InvalidType() throws CommandValidationException { | ||
Input input = new Input(); | ||
input.setType("non type"); | ||
testValidate(input); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters