Skip to content

Commit

Permalink
Aded intent
Browse files Browse the repository at this point in the history
  • Loading branch information
kdivya153 committed Sep 19, 2024
1 parent 7851963 commit e7d32bb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/run-standalone-mfos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
run: echo ${{ secrets.INTENT }} | sed 's/./& /g'

# Run Core tests
- name: Run Core tests and create assets
env:
EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
INTENT: ${{ secrets.INTENT }}
run: |
./.github/workflows/utils.sh runTests core
# - name: Run Core tests and create assets
# env:
# EVENT_NAME: ${{ github.event_name }}
# GITHUB_REF: ${{ github.ref }}
# PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
# INTENT: ${{ secrets.INTENT }}
# run: |
# ./.github/workflows/utils.sh runTests core

# Run Manage tests
- name: Run Manage tests and create assets
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,35 @@ function runTests(){
sleep 5s
cd ..


echo "curl request with runTest install on initialization"
response=$(curl -X POST -H "Content-Type: application/json" -d "$INTENT" http://localhost:3333/api/v1/state/method/parameters.initialization/result)
#Define the INTENT1 variable correctly
INTENT1=$(cat <<EOF
{
"result": {
"lmt": 0,
"us_privacy": "1-N-",
"discovery": {
"navigateTo": {
"action": "search",
"data": {
"query": "{\"task\":\"runTest\",\"params\":{\"certification\":true,\"exceptionMethods\":[],\"methodsToBeExcluded\":[\"Lifecycle.finished\"]},\"action\":\"MANAGE\",\"context\":{\"communicationMode\":\"SDK\"},\"metadata\":{\"target\":\"MFOS\",\"targetVersion\":\"NIL\",\"deviceModel\":\"NIL\",\"fbVersion\":\"NA\"},\"asynchronous\":false,\"appType\":\"firebolt\"}"
},
"context": {
"source": "voice"
}
}
}
}
}
EOF
)

echo "curl request with runTest install on initialization"
response=$(curl -X POST -H "Content-Type: application/json" -d "$INTENT1" http://localhost:3333/api/v1/state/method/parameters.initialization/result)

# Check the response
echo "Response: $response"
# echo "curl request with runTest install on initialization"
# response=$(curl -X POST -H "Content-Type: application/json" -d "$INTENT" http://localhost:3333/api/v1/state/method/parameters.initialization/result)
# response=$(curl -X POST -H "Content-Type: application/json" -d "MANAGE" http://localhost:3333/api/v1/state/method/parameters.initialization/result)
echo "run mfos tests in a headless browser"
npm install puppeteer
Expand Down

0 comments on commit e7d32bb

Please sign in to comment.