mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
17 lines
225 B
Go
17 lines
225 B
Go
![]() |
package openbgpd
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestConfigAPIURL(t *testing.T) {
|
||
|
cfg := &Config{
|
||
|
API: "http://a",
|
||
|
}
|
||
|
|
||
|
url := cfg.APIURL("/%d/bgpd", 42)
|
||
|
if url != "http://a/42/bgpd" {
|
||
|
t.Error("unexpected url:", url)
|
||
|
}
|
||
|
}
|