probe/auth/info/info_test.go
crusader 07c068fa89 ing
2018-06-13 18:27:04 +09:00

123 lines
2.6 KiB
Go

package info
import (
"reflect"
"testing"
ocmi "git.loafle.net/overflow/commons-go/model/infra"
)
func TestGetRegistHeader(t *testing.T) {
type args struct {
apiKey string
}
tests := []struct {
name string
args args
want string
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := GetRegistHeader(tt.args.apiKey)
if (err != nil) != tt.wantErr {
t.Errorf("GetRegistHeader() error = %v, wantErr %v", err, tt.wantErr)
return
}
if got != tt.want {
t.Errorf("GetRegistHeader() = %v, want %v", got, tt.want)
}
})
}
}
func Test_getInfraHost(t *testing.T) {
tests := []struct {
name string
want *ocmi.InfraHost
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := getInfraHost()
if (err != nil) != tt.wantErr {
t.Errorf("getInfraHost() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("getInfraHost() = %v, want %v", got, tt.want)
}
})
}
}
func Test_getInfraHostMachine(t *testing.T) {
tests := []struct {
name string
want *ocmi.InfraHostMachine
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := getInfraHostMachine()
if (err != nil) != tt.wantErr {
t.Errorf("getInfraHostMachine() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("getInfraHostMachine() = %v, want %v", got, tt.want)
}
})
}
}
func Test_getInfraHostOS(t *testing.T) {
tests := []struct {
name string
want *ocmi.InfraHostOS
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := getInfraHostOS()
if (err != nil) != tt.wantErr {
t.Errorf("getInfraHostOS() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("getInfraHostOS() = %v, want %v", got, tt.want)
}
})
}
}
func Test_getInfraHostIPs(t *testing.T) {
tests := []struct {
name string
want []*ocmi.InfraHostIP
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := getInfraHostIPs()
if (err != nil) != tt.wantErr {
t.Errorf("getInfraHostIPs() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("getInfraHostIPs() = %v, want %v", got, tt.want)
}
})
}
}