remove commented code, add unit test
This commit is contained in:
parent
c84b1b12ba
commit
3eb4cc16d0
@ -201,20 +201,6 @@ func (pb Builder) withPrefix(elements ...string) *Builder {
|
||||
return res
|
||||
}
|
||||
|
||||
// verifyPrefix ensures that the tenant and resourceOwner are valid
|
||||
// values, and that the builder has some directory structure.
|
||||
// func (pb Builder) verifyPrefix(tenant, resourceOwner string) error {
|
||||
// if err := verifyPrefixValues(tenant, resourceOwner); err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
// if len(pb.elements) == 0 {
|
||||
// return clues.New("missing path beyond prefix")
|
||||
// }
|
||||
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Data Layer Path Transformers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@ -3,10 +3,10 @@ package path
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
)
|
||||
|
||||
@ -241,3 +241,24 @@ func (suite *ServiceResourceUnitSuite) TestElementsToServiceResource() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *ServiceResourceUnitSuite) TestToMetadataServices() {
|
||||
srs := []ServiceResource{
|
||||
{ExchangeService, "mailbox"},
|
||||
{OneDriveService, "user"},
|
||||
{SharePointService, "site"},
|
||||
{GroupsService, "group"},
|
||||
}
|
||||
|
||||
expect := []ServiceResource{
|
||||
{ExchangeMetadataService, "mailbox"},
|
||||
{OneDriveMetadataService, "user"},
|
||||
{SharePointMetadataService, "site"},
|
||||
{GroupsMetadataService, "group"},
|
||||
}
|
||||
|
||||
assert.Equal(
|
||||
suite.T(),
|
||||
expect,
|
||||
toMetadataServices(srs))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user