overflow_service/proxy/infra/infra_service_test.go
insanity@loafle.com 3334bc1b4c infra/target
2017-06-26 16:14:04 +09:00

37 lines
616 B
Go

package infra
import (
"encoding/json"
"git.loafle.net/overflow/commons_go/model/timestamp"
"git.loafle.net/overflow/overflow_service/proxy/meta"
"testing"
)
func TestInfraRegist(t *testing.T) {
is := InfraService{}
infraType := meta.MetaInfraType{
Id: json.Number("1"),
}
infra := &Infra{
MetaInfraType: infraType,
ChildId: json.Number("0"),
CreateDate: timestamp.Now(),
}
res, err := is.Regist(infra)
if err != nil {
t.Fatal(err)
}
t.Log(res)
}
func TestInfraList(t *testing.T) {
is := InfraService{}
res, err := is.Read("1")
if err != nil {
t.Fatal(err)
}
t.Log(res)
}