Skip to content

Commit

Permalink
shelcheck updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wagmarcel committed Jul 1, 2024
1 parent e9fa0a9 commit 2b08ba7
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ DEVICE_ID="testdevice"
DEVICE_ID2="testdevice2"
DEVICE_TOKEN_SCOPE="device_id gateway mqtt-broker offline_access subdevice_ids"
DEVICE_TOKEN_AUDIENCE_FROM_DIRECT='mqtt-broker'
SUBDEVICE_ID=testsubdevice1
SUBDEVICE_IDS='"[\"testsubdevice1\"]"'
# shellcheck disable=SC2089
SUBDEVICE_IDS2='"[\"testsubdevice1\",\"testsubdevice2\",\"testsubdevice3\"]"'
MQTT_URL=emqx-listeners:1883
MQTT_TOPIC_NAME="spBv1.0/${NAMESPACE}/DDATA/${GATEWAY_ID}/${DEVICE_ID}"
MQTT_SUBDEVICE_TOPIC_NAME="spBv1.0/${NAMESPACE}/DDATA/${GATEWAY_ID}/testsubdevice1"
MQTT_SUBDEVICE_TOPIC_NAME2="spBv1.0/${NAMESPACE}/DDATA/${GATEWAY_ID}/testsubdevice2"
Expand Down Expand Up @@ -170,7 +169,7 @@ check_refreshed_device_token_with_subcomponents() {
check_json_field "${jwt}" "azp" "device" || return 1
check_json_field "${jwt}" "device_id" "${DEVICE_ID}" || return 1
check_json_field "${jwt}" "gateway" "${GATEWAY_ID}" || return 1
check_json_field "${jwt}" "subdevice_ids" $(echo "${SUBDEVICE_IDS}"| tr -d '"') || return 1
check_json_field "${jwt}" "subdevice_ids" "$(echo "${SUBDEVICE_IDS}"| tr -d '\"')" || return 1
check_device_token_scope "${jwt}" || return 1
check_vanilla_device_token_audience "${jwt}" || return 1
}
Expand All @@ -180,7 +179,7 @@ check_refreshed_device_token_with_subcomponents2() {
check_json_field "${jwt}" "azp" "device" || return 1
check_json_field "${jwt}" "device_id" "${DEVICE_ID}" || return 1
check_json_field "${jwt}" "gateway" "${GATEWAY_ID}" || return 1
check_json_field "${jwt}" "subdevice_ids" $(echo "${SUBDEVICE_IDS2}"| tr -d '"') || return 1
check_json_field "${jwt}" "subdevice_ids" "$(echo "${SUBDEVICE_IDS2}"| tr -d '\"')" || return 1
check_device_token_scope "${jwt}" || return 1
check_vanilla_device_token_audience "${jwt}" || return 1
}
Expand Down

0 comments on commit 2b08ba7

Please sign in to comment.