Skip to content

Commit

Permalink
Update Python and SocketPython to 1.5.8 (#82)
Browse files Browse the repository at this point in the history
* Add CI Changes to support 1.5.8 updates

* Add Environment and TCK Step changes to support 1.5.8 updates

* Add Python Test Agent Changes to support 1.5.8 update

* Update uuid_validator.feature to 1.5.8

* Update socket transport to 1.5.8

* Add support for asynchronous uTransport according to up-python and up-java implementation
* Add support for source_filter and sink_filter matching
* Add support in python test agent for asynchronous transport

* Address comments

* tck steps now supports implementation of transport initializiation

* Update transport feature files

* Update requirements.txt

Add multimethod to requirements.txt

* Change to UUri building for source

Had to change how uuris were getting built, data was unnecessary

* Resolve comments related to UUri Gen

* In this commit, I made the authority name of the transport's source uri dynamic according to the Test Agent name, as well as adding a new check for the ue_id according to the spec.
  • Loading branch information
matthewd0123 committed Jul 24, 2024
1 parent 284e214 commit f59656a
Show file tree
Hide file tree
Showing 18 changed files with 436 additions and 699 deletions.
62 changes: 33 additions & 29 deletions .github/workflows/tck-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Rust Test Agent
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path test_agent/rust/Cargo.toml
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build up_client_socket_java with Maven
working-directory: up_client_socket/java
run: |
mvn clean install --file pom.xml
- name: Build java_test_agent with Maven
working-directory: test_agent/java
run: |
mvn clean install --file pom.xml
# - name: Build Rust Test Agent
# uses: actions-rs/cargo@v1
# with:
# command: build
# args: --manifest-path test_agent/rust/Cargo.toml
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: maven
#- name: Install dependencies
# run: |
# cd scripts
# python build_up_java_latest.py
# - name: Build up_client_socket_java with Maven
# working-directory: up_client_socket/java
# run: |
# mvn clean install --file pom.xml
# - name: Build java_test_agent with Maven
# working-directory: test_agent/java
# run: |
# mvn clean install --file pom.xml
- name: Set up Python 3.8.7
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -76,19 +80,19 @@ jobs:
var feature_json = JSON.parse(fs.readFileSync('./test_manager/testData/workflow_test_data.json', 'utf8'));
const command_list = [];
for(var feature_file_name in feature_json){
for (var language in feature_json[feature_file_name]["ue1"]){
for (var transport in feature_json[feature_file_name]["transports"]){
var port_language = feature_json[feature_file_name]["ue1"][language]
var port_transport = feature_json[feature_file_name]["transports"][transport]
if ("ue2" in feature_json[feature_file_name]){
for (var language_two in feature_json[feature_file_name]["ue2"]){
var second_ue = feature_json[feature_file_name]["ue2"][language_two]
var command_str = "behave --define uE1=" + port_language + " --define uE2=" + second_ue + " --define transport=" + port_transport + " --format json --outfile './reports/" + feature_file_name + "_" + port_language + ".json' --format html --outfile './reports/" + feature_file_name + "_" + port_language + ".html' './features/tests/" + feature_json[feature_file_name]["path"] + "/" + feature_file_name + ".feature'"
for(var feature of feature_json){
for (var language in feature["ue1"]){
for (var transport in feature["transports"]){
var port_language = feature["ue1"][language]
var port_transport = feature["transports"][transport]
if ("ue2" in feature){
for (var language_two in feature["ue2"]){
var second_ue = feature["ue2"][language_two]
var command_str = "behave --define uE1=" + port_language + " --define uE2=" + second_ue + " --define transport1=" + port_transport + " --define transport2=" + port_transport + " --format json --outfile './reports/" + feature["feature_name"] + "_" + port_language + "_" + second_ue + ".json' --format html --outfile './reports/" + feature["feature_name"] + "_" + port_language + "_" + second_ue + ".html' './features/tests/" + feature["path"] + "/" + feature["feature_name"] + ".feature'"
command_list.push(command_str);
}
} else {
var command_str = "behave --define uE1=" + port_language + " --define transport=" + port_transport + " --format json --outfile './reports/" + feature_file_name + "_" + port_language + ".json' --format html --outfile './reports/" + feature_file_name + "_" + port_language + ".html' './features/tests/" + feature_json[feature_file_name]["path"] + "/" + feature_file_name + ".feature'"
var command_str = "behave --define uE1=" + port_language + " --define transport1=" + port_transport + " --format json --outfile './reports/" + feature["feature_name"] + "_" + port_language + ".json' --format html --outfile './reports/" + feature["feature_name"] + "_" + port_language + ".html' './features/tests/" + feature["path"] + "/" + feature["feature_name"] + ".feature'"
command_list.push(command_str);
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
behave >= 1.2.6
behave-html-formatter
multimethod
psutil
PyHamcrest
1 change: 1 addition & 0 deletions test_agent/python/constants/actioncommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
VALIDATE_UATTRIBUTES = "uattributes_validate"
MICRO_SERIALIZE_URI = "micro_serialize_uri"
MICRO_DESERIALIZE_URI = "micro_deserialize_uri"
INITIALIZE_TRANSPORT = "initialize_transport"
2 changes: 1 addition & 1 deletion test_agent/python/constants/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
#
# -------------------------------------------------------------------------

TEST_MANAGER_ADDR = ("127.0.0.5", 12345)
TEST_MANAGER_ADDR = ("127.0.0.5", 33333)
BYTES_MSG_LENGTH: int = 32767
Loading

0 comments on commit f59656a

Please sign in to comment.