Daniele Rossi | 856b06d | 2019-10-04 16:34:35 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 21 | package afrouter |
| 22 | |
| 23 | import ( |
Daniele Rossi | 856b06d | 2019-10-04 16:34:35 +0200 | [diff] [blame] | 24 | "github.com/stretchr/testify/assert" |
| 25 | "testing" |
| 26 | ) |
| 27 | |
Daniele Rossi | 856b06d | 2019-10-04 16:34:35 +0200 | [diff] [blame] | 28 | // Test for function signalHandler and cleanExit |
| 29 | func TestSignalsInitExitHandler(t *testing.T) { |
| 30 | |
| 31 | assert.Nil(t, InitExitHandler()) |
| 32 | |
| 33 | } |