| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # |
| 15 | |
| garciadeblas | cf603f5 | 2025-06-04 11:57:28 +0200 | [diff] [blame] | 16 | source ../library/track |
| 17 | source ../library/logging |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 18 | |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 19 | RELEASE="test_track" |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 20 | OSM_DOCKER_TAG=latest |
| 21 | OSM_TRACK_INSTALLATION_ID="$(date +%s)-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)" |
| 22 | |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 23 | echo "Next track call should fail" |
| 24 | echo "track" |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 25 | track |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 26 | echo |
| 27 | echo "Next, several track calls are done with different args" |
| 28 | echo "track test-event" |
| 29 | track test-event |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 30 | sleep 1 |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 31 | echo "track test-event release $RELEASE" |
| 32 | track test-event release $RELEASE |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 33 | sleep 1 |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 34 | echo "track test-event docker_tag $OSM_DOCKER_TAG none none" |
| 35 | track test-event docker_tag $OSM_DOCKER_TAG none none |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 36 | sleep 1 |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 37 | echo "track test-event release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none" |
| 38 | track test-event release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 39 | sleep 1 |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 40 | echo 'track test-event my-op my-value "My comment" none' |
| 41 | track test-event my-op my-value "My comment" none |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 42 | sleep 1 |
| garciadeblas | 4d89c37 | 2021-11-25 11:57:18 +0100 | [diff] [blame] | 43 | echo 'track test-event my-op my-value "My comment" "tag1,tag2"' |
| 44 | track test-event my-op my-value "My comment" "tag1,tag2" |
| 45 | sleep 1 |
| 46 | echo 'track test-event op1 value1 "My comment1 on test event" none op2 value2 "My comment2 on test event" none' |
| 47 | track test-event op1 value1 "My comment1 on test event" none op2 value2 "My comment2 on test event" none |
| 48 | sleep 1 |
| 49 | echo |
| 50 | echo "Next track call will be done from function FATAL_TRACK" |
| garciadeblas | 8fed108 | 2022-08-29 11:25:02 +0200 | [diff] [blame] | 51 | echo 'FATAL_TRACK test-fatal "Fatal error during execution"' |
| 52 | FATAL_TRACK test-fatal "Fatal error during execution" |
| garciadeblas | 0bc8752 | 2021-10-20 22:16:17 +0200 | [diff] [blame] | 53 | |