Replaced TenantIDWithOpts with TenantIDWithAPIOpts

This commit is contained in:
andronache
2021-03-17 16:51:14 +02:00
committed by Dan Christian Bogos
parent 8b0748b139
commit a6f41adaf9
105 changed files with 943 additions and 943 deletions

View File

@@ -750,16 +750,16 @@ type TenantID struct {
ID string
}
type TenantIDWithOpts struct {
type TenantIDWithAPIOpts struct {
*TenantID
Opts map[string]interface{}
APIOpts map[string]interface{}
}
func (tID *TenantID) TenantID() string {
return ConcatenatedKey(tID.Tenant, tID.ID)
}
func (tID *TenantIDWithOpts) TenantIDConcatenated() string {
func (tID *TenantIDWithAPIOpts) TenantIDConcatenated() string {
return ConcatenatedKey(tID.Tenant, tID.ID)
}

View File

@@ -1258,12 +1258,12 @@ func TestTenantID(t *testing.T) {
}
func TestTenantIDWithCache(t *testing.T) {
tID := &TenantIDWithOpts{TenantID: &TenantID{Tenant: EmptyString, ID: EmptyString}}
tID := &TenantIDWithAPIOpts{TenantID: &TenantID{Tenant: EmptyString, ID: EmptyString}}
eOut := ":"
if rcv := tID.TenantID.TenantID(); rcv != eOut {
t.Errorf("Expecting: %q, received: %q", eOut, rcv)
}
tID = &TenantIDWithOpts{TenantID: &TenantID{Tenant: "cgrates.org", ID: "id"}}
tID = &TenantIDWithAPIOpts{TenantID: &TenantID{Tenant: "cgrates.org", ID: "id"}}
eOut = "cgrates.org:id"
if rcv := tID.TenantID.TenantID(); rcv != eOut {
t.Errorf("Expecting: %q, received: %q", eOut, rcv)