FIxed MIssingStructFields test

This commit is contained in:
porosnicuadrian
2021-08-02 18:08:18 +03:00
committed by Dan Christian Bogos
parent 858878cc12
commit d54f73cd90

View File

@@ -37,9 +37,9 @@ func TestMissingStructFieldsCorrect(t *testing.T) {
}
func TestMissingStructFieldsNilCorporate(t *testing.T) {
tst := &TenantIDWithAPIOpts{
APIOpts: map[string]interface{}{
OptsAPIKey: "attr1234",
tst := &TenantArgWithPaginator{
Paginator: Paginator{
Limit: IntPointer(1),
},
}
if missing := MissingStructFields(tst,
@@ -52,14 +52,12 @@ func TestMissingStructFieldsNilCorporateTwoStructs(t *testing.T) {
tst := &struct {
APIOpts map[string]interface{}
*TenantID
*TenantWithAPIOpts
*TenantArg
}{
APIOpts: map[string]interface{}{
OptsAPIKey: "attr1234",
},
TenantID: &TenantID{
Tenant: "cgrates.org",
},
TenantArg: &TenantArg{},
}
if missing := MissingStructFields(tst,
[]string{Tenant}); len(missing) != 1 {