blob: 65e6e86ffb2957fd9593c59d35d5727a54239d0e [file] [log] [blame]
garciadeblas0bc87522021-10-20 22:16:17 +02001#!/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
16source ../common/track
garciadeblas4d89c372021-11-25 11:57:18 +010017source ../common/logging
garciadeblas0bc87522021-10-20 22:16:17 +020018
garciadeblas4d89c372021-11-25 11:57:18 +010019RELEASE="test_track"
garciadeblas0bc87522021-10-20 22:16:17 +020020OSM_DOCKER_TAG=latest
21OSM_TRACK_INSTALLATION_ID="$(date +%s)-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)"
22
garciadeblas4d89c372021-11-25 11:57:18 +010023echo "Next track call should fail"
24echo "track"
garciadeblas0bc87522021-10-20 22:16:17 +020025track
garciadeblas4d89c372021-11-25 11:57:18 +010026echo
27echo "Next, several track calls are done with different args"
28echo "track test-event"
29track test-event
garciadeblas0bc87522021-10-20 22:16:17 +020030sleep 1
garciadeblas4d89c372021-11-25 11:57:18 +010031echo "track test-event release $RELEASE"
32track test-event release $RELEASE
garciadeblas0bc87522021-10-20 22:16:17 +020033sleep 1
garciadeblas4d89c372021-11-25 11:57:18 +010034echo "track test-event docker_tag $OSM_DOCKER_TAG none none"
35track test-event docker_tag $OSM_DOCKER_TAG none none
garciadeblas0bc87522021-10-20 22:16:17 +020036sleep 1
garciadeblas4d89c372021-11-25 11:57:18 +010037echo "track test-event release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none"
38track test-event release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none
garciadeblas0bc87522021-10-20 22:16:17 +020039sleep 1
garciadeblas4d89c372021-11-25 11:57:18 +010040echo 'track test-event my-op my-value "My comment" none'
41track test-event my-op my-value "My comment" none
garciadeblas0bc87522021-10-20 22:16:17 +020042sleep 1
garciadeblas4d89c372021-11-25 11:57:18 +010043echo 'track test-event my-op my-value "My comment" "tag1,tag2"'
44track test-event my-op my-value "My comment" "tag1,tag2"
45sleep 1
46echo 'track test-event op1 value1 "My comment1 on test event" none op2 value2 "My comment2 on test event" none'
47track test-event op1 value1 "My comment1 on test event" none op2 value2 "My comment2 on test event" none
48sleep 1
49echo
50echo "Next track call will be done from function FATAL_TRACK"
51echo 'FATAL_TRACK test-event "Fatal error during execution"'
52FATAL_TRACK test-event "Fatal error during execution"
garciadeblas0bc87522021-10-20 22:16:17 +020053