-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.2.2' into master
- Loading branch information
Showing
26 changed files
with
571 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
########################## Functions Declaration ########################## | ||
# Bash tips: Colors and formatting (ANSI/VT100 Control sequences) | ||
# https://misc.flogisoft.com/bash/tip_colors_and_formatting | ||
# Pass arguments into a function | ||
# https://bash.cyberciti.biz/guide/Pass_arguments_into_a_function | ||
function now() { | ||
nowVariable=$(date +%Y-%m-%d' '%H:%M:%S.%N | cut -b 1-23) | ||
echo "$nowVariable" | ||
} | ||
|
||
function printInfo() { | ||
echo -e "$(now) \e[32mINFO --- $1\e[0m" | ||
return 0 | ||
} | ||
|
||
function printWarn() { | ||
echo -e "$(now) \e[33mWARN --- $1\e[0m" | ||
return 0 | ||
} | ||
|
||
function printError() { | ||
echo -e "$(now) \e[31mERROR --- $1\e[0m" | ||
return 0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Run the maven install | ||
# Exit immediately if a command exits with a non-zero status. | ||
# https://stackoverflow.com/questions/19622198/what-does-set-e-mean-in-a-bash-script | ||
set -e | ||
|
||
########################## Functions Import ########################## | ||
source ./.travis/common.sh | ||
|
||
CURRENT_DIR=$(pwd) | ||
printInfo "[INSTALL] CURRENT_DIR: $CURRENT_DIR" | ||
printInfo "[INSTALL] List of CURRENT_DIR:" | ||
command "ls" | ||
|
||
# Run the Maven clean install | ||
./mvnw clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet --batch-mode --show-version | ||
|
||
INSTALL_COMMAND_RESULT=$? | ||
|
||
if [ "$INSTALL_COMMAND_RESULT" -eq 0 ]; then | ||
printInfo "[INSTALL] Installation succeed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT" | ||
else | ||
printError "[INSTALL] Installation failed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT" >&2 | ||
exit 1 | ||
fi |
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
48 changes: 48 additions & 0 deletions
48
...ithub/johnnymillergh/boot/mediastreamingsampleapp/api/MediaStreamingReactiveApiTests.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,48 @@ | ||
package com.github.johnnymillergh.boot.mediastreamingsampleapp.api; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.test.web.reactive.server.WebTestClient; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* Description: ApiTests, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: [email protected], date: 10/27/2020 4:36 PM | ||
**/ | ||
@Slf4j | ||
@SpringBootTest | ||
@AutoConfigureWebTestClient | ||
public class MediaStreamingReactiveApiTests { | ||
@Autowired | ||
private WebTestClient webTestClient; | ||
|
||
@Test | ||
void getVideoAnnotationBased() { | ||
webTestClient | ||
.get() | ||
.uri("/video-annotation") | ||
.accept(MediaType.ALL) | ||
.exchange() | ||
.expectStatus() | ||
.isOk(); | ||
log.info("getVideoAnnotationBased passed"); | ||
} | ||
|
||
@Test | ||
void mediaInfo() { | ||
webTestClient | ||
.get() | ||
.uri(String.format("/media-info/%s.mp4", UUID.randomUUID())) | ||
.accept(MediaType.APPLICATION_JSON) | ||
.exchange() | ||
.expectStatus() | ||
.is4xxClientError(); | ||
log.info("mediaInfo passed."); | ||
} | ||
} |
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
Oops, something went wrong.