summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
99018ce)
Change-Id: I891f8810c687224df42e2a477350cf0f838146cb
Signed-off-by: Anssi Mannila <anssi.mannila@nokia.com>
# limitations under the License.
#==================================================================================
# limitations under the License.
#==================================================================================
echo "--> build_ubuntu.sh starts"
echo "--> build_ubuntu.sh starts"
export RMR_SEED_RT=../config/uta_rtg.rt
# xApp stuff
export RMR_SEED_RT=../config/uta_rtg.rt
# xApp stuff
-export DEF_FILE=../definitions/alarm-definition.json
+export DEF_FILE=../../definitions/alarm-definition.json
export PERF_DEF_FILE=../testresources/perf-alarm-definition.json
export PERF_OBJ_FILE=../testresources/perf-alarm-object.json
export PERF_DEF_FILE=../testresources/perf-alarm-definition.json
export PERF_OBJ_FILE=../testresources/perf-alarm-object.json
# compile the CLI
cd ${ROOT_DIR}/cli && go build -a -installsuffix cgo alarm-cli.go
# compile the CLI
cd ${ROOT_DIR}/cli && go build -a -installsuffix cgo alarm-cli.go
# Execute UT and measure coverage for the Alarm Library
cd ${ROOT_DIR}/alarm && go test . -v -coverprofile cover.out
# Execute UT and measure coverage for the Alarm Library
cd ${ROOT_DIR}/alarm && go test . -v -coverprofile cover.out
+# Copy alarm/cover.out to alarm-go/cover.out
+cd ${ROOT_DIR} && cat alarm/cover.out > coverage.out
+
# And for the Alarm Manager
# And for the Alarm Manager
-cd ${ROOT_DIR}/manager && go test -v -p 1 -coverprofile cover.out ./cmd/ -c -o ./manager_test && ./manager_test
+#cd ${ROOT_DIR}/manager && go test -v -p 1 -coverprofile cover.out ./cmd/ -c -o ./manager_test && ./manager_test
+cd ${ROOT_DIR}/manager && GO111MODULE=on RMR_SEED_RT=../../config/uta_rtg.rt CFG_FILE=../../config/config-file.json go test -v -p 1 -cover -coverprofile=cover.out ./...
+
+# Remove first line of the manager/cover.out and append to alarm-go/coverity.out
+cd ${ROOT_DIR} && sed '1d' manager/cover.out >> coverage.out
+
+cd ${ROOT_DIR} && GO111MODULE=on go tool cover -html=coverage.out -o coverage.html
echo "--> build_ubuntu.sh ends"
echo "--> build_ubuntu.sh ends"
- Syntax: cli/alarm-cli gapam --active --inhibited --silenced --unprocessed --host [--port]
+ Syntax: cli/alarm-cli alerts --active --inhibited --silenced --unprocessed --host [--port]
- Example: cli/alarm-cli gapam --active true --inhibited true --silenced true --unprocessed true --host 10.102.36.121 --port 9093
+ Example: cli/alarm-cli alerts --active true --inhibited true --silenced true --unprocessed true --host 10.102.36.121 --port 9093
REST interface usage guide
REST interface usage guide
github.com/gorilla/mux v1.7.1
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/gorilla/mux v1.7.1
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/mattn/go-runewidth v0.0.9 // indirect
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/prometheus/alertmanager v0.20.0
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
github.com/prometheus/alertmanager v0.20.0
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
commandReady := make(chan bool, 1)
command := "cli/alarm-cli"
commandReady := make(chan bool, 1)
command := "cli/alarm-cli"
- args := []string{"gapam", "--active", "true", "--inhibited", "true", "--silenced", "--unprocessed", "true", "true", "--host", "localhost", "--port", "9093", "flushall"}
+ args := []string{"alerts", "--active", "true", "--inhibited", "true", "--silenced", "--unprocessed", "true", "true", "--host", "localhost", "--port", "9093", "flushall"}
ExecCLICommand(commandReady, command, args...)
<-commandReady
ExecCLICommand(commandReady, command, args...)
<-commandReady