blob: 213e141c4f4e96476e3839914313b9c46a5f3d51 [file] [log] [blame]
Daniele Rossi856b06d2019-10-04 16:34:35 +02001/*
2 * Copyright 2018-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This file implements an exit handler that tries to shut down all the
18// running servers before finally exiting. There are 2 triggers to this
19// clean exit thread: signals and an exit channel.
20
21package afrouter
22
23import (
Daniele Rossi856b06d2019-10-04 16:34:35 +020024 "github.com/stretchr/testify/assert"
25 "testing"
26)
27
Daniele Rossi856b06d2019-10-04 16:34:35 +020028// Test for function signalHandler and cleanExit
29func TestSignalsInitExitHandler(t *testing.T) {
30
31 assert.Nil(t, InitExitHandler())
32
33}