mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Add test for IfaceAsString net.IP case
This commit is contained in:
committed by
Dan Christian Bogos
parent
e189cfe9d1
commit
96caf804c5
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package utils
|
||||
|
||||
import (
|
||||
"net"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -258,6 +259,12 @@ func TestIfaceAsString(t *testing.T) {
|
||||
} else if rply != "" {
|
||||
t.Errorf("Expeced ,recived %+v", rply)
|
||||
}
|
||||
val = interface{}(net.ParseIP("127.0.0.1"))
|
||||
if rply, err := IfaceAsString(val); err != nil {
|
||||
t.Error(err)
|
||||
} else if rply != "127.0.0.1" {
|
||||
t.Errorf("Expeced ,recived %+v", rply)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIfaceAsTime(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user