-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## v1.7.1 ||| |---|---| |Date|2023-10-11 |Kind| BUGFIX release |Author|[email protected], - **BUGFIX** - Fixed a bug in the ETP & EAA CLI that prevented ULS to run properly in docker environment - [docker] bumped CLI-EAA to "0.6.3" - [docker] bumped CLI-ETP version to "0.4.5" - **Housekeeping** - Added additional automated testing to the docker release process
- Loading branch information
1 parent
9896496
commit 2efdc34
Showing
6 changed files
with
122 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
# Version History | ||
## v1.7.1 | ||
||| | ||
|---|---| | ||
|Date|2023-10-11 | ||
|Kind| BUGFIX release | ||
|Author|[email protected], | ||
- **BUGFIX** | ||
- Fixed a bug in the ETP & EAA CLI that prevented ULS to run properly in docker environment | ||
- [docker] bumped CLI-EAA to "0.6.3" | ||
- [docker] bumped CLI-ETP version to "0.4.5" | ||
- **Housekeeping** | ||
- Added additional automated testing to the docker release process | ||
|
||
## v1.7.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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/usr/bin/env bats | ||
|
||
## THIS Should be run from ULS ROOT DIR | ||
|
||
# Variables | ||
# ULS Binary | ||
uls_bin=bin/uls.py | ||
|
||
# Should we using a mocked edgerc (TRUE/FALSE) ? | ||
mocked_edgerc=FALSE | ||
|
||
# TIMEOUT | ||
# How much time is timeout alklowed to run | ||
uls_test_timeout=10 | ||
# Send a kill signal after | ||
uls_kill_timeout=15 | ||
# Used for regular timeout | ||
uls_timeout_signal="TERM" | ||
uls_timeout_params=" --preserve-status --kill-after $uls_kill_timeout --signal ${uls_timeout_signal} ${uls_test_timeout} " | ||
|
||
### Switch between mocked and real edgerc | ||
if [ "$mocked_edgerc"=="FALSE" ] ; then | ||
# REAL EDGERC FILE | ||
uls_edgerc=~/.edgerc | ||
uls_section=akamaidemo | ||
|
||
|
||
# Variables | ||
eaa_access_assert="username" | ||
eaa_devinv_assert="client_version" | ||
etp_assert="configId" | ||
gc_assert="flow_id" | ||
linode_assert="" | ||
jmespath_assert="['" | ||
else | ||
# TESTING EDGERC FILE & section | ||
uls_edgerc=test/_mocked_edgerc | ||
uls_section=testing | ||
# Variables | ||
eaa_access_assert="" | ||
eaa_devinv_assert="" | ||
etp_assert="" | ||
gc_assert="" | ||
linode_assert="" | ||
jmespath_assert="" | ||
fi | ||
|
||
|
||
# Load support libs | ||
load 'bats/bats-support/load.bash' | ||
load 'bats/bats-assert/load.bash' | ||
|
||
# DOCKER TESTING | ||
|
||
## Make sure everything is tidy and clean after every test ;) | ||
teardown () { | ||
docker stop uls-bats-test && docker rm uls-bats-test | ||
return 0 | ||
} | ||
|
||
## CREATE a local DOCKER IMAGE | ||
@test "DOCKER IMAGE BUILD" { | ||
run docker build -t uls:bats . | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
## RUN AN EAA TEST | ||
@test "DOCKER EAA TEST" { | ||
run timeout ${uls_timeout_params} docker run --rm --name "uls-bats-test" --mount type=bind,source="${uls_edgerc}",target="/opt/akamai-uls/.edgerc",readonly uls:bats --section ${uls_section} --input eaa --feed access --output raw --loglevel info | ||
assert_line --partial "UlsInputCli - started PID" | ||
refute_line --partial "was found stale -" | ||
#[ "$status" -eq 0 ] | ||
} | ||
|
||
## RUN AN ETP TEST | ||
@test "DOCKER ETP TEST" { | ||
run timeout ${uls_timeout_params} docker run --rm --name "uls-bats-test" --mount type=bind,source="${uls_edgerc}",target="/opt/akamai-uls/.edgerc",readonly uls:bats --section ${uls_section} --input etp --feed threat --output raw --loglevel info | ||
assert_line --partial "UlsInputCli - started PID" | ||
refute_line --partial "was found stale -" | ||
#[ "$status" -eq 0 ] | ||
} | ||
|
||
## RUN AN MFA TEST | ||
@test "DOCKER MFA TEST" { | ||
run timeout ${uls_timeout_params} docker run --rm --name "uls-bats-test" --mount type=bind,source="${uls_edgerc}",target="/opt/akamai-uls/.edgerc",readonly uls:bats --section ${uls_section} --input mfa --feed event --output raw --loglevel info | ||
assert_line --partial "UlsInputCli - started PID" | ||
refute_line --partial "was found stale -" | ||
#[ "$status" -eq 0 ] | ||
} | ||
|
||
## RUN AN GC TEST | ||
@test "DOCKER GC TEST" { | ||
run timeout ${uls_timeout_params} docker run --rm --name "uls-bats-test" --mount type=bind,source="${uls_edgerc}",target="/opt/akamai-uls/.edgerc",readonly uls:bats --section ${uls_section} --input gc --feed netlog --output raw --loglevel info | ||
assert_line --partial "UlsInputCli - started PID" | ||
refute_line --partial "was found stale -" | ||
#[ "$status" -eq 0 ] | ||
} | ||
|
||
## REMOVE the local DOCKER IMAGE | ||
@test "DOCKER IMAGE BUILD" { | ||
docker image rm uls:bats | ||
[ "$status" -eq 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