GraphConnector testing expanded (#180)

* GraphConnector testing expanded
setTenantUsers covered and switched the test account for an account with fewer corner cases.
This commit is contained in:
Danny 2022-06-10 15:31:20 -04:00 committed by GitHub
parent f03432e303
commit 1957de09d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,12 +54,17 @@ func TestDisconnectedGraphSuite(t *testing.T) {
suite.Run(t, new(DiconnectedGraphConnectorSuite)) suite.Run(t, new(DiconnectedGraphConnectorSuite))
} }
// TestExchangeDataCollection is a call to the M365 backstore to very func (suite *GraphConnectorIntegrationSuite) TestGraphConnector_setTenantUsers() {
func (suite *GraphConnectorIntegrationSuite) TestExchangeDataCollection() { err := suite.connector.setTenantUsers()
assert.NoError(suite.T(), err)
suite.Greater(len(suite.connector.Users), 0)
}
func (suite *GraphConnectorIntegrationSuite) TestGraphConnector_ExchangeDataCollection() {
if os.Getenv("INTEGRATION_TESTING") != "" { if os.Getenv("INTEGRATION_TESTING") != "" {
suite.T().Skip("Environmental Variables not set") suite.T().Skip("Environmental Variables not set")
} }
exchangeData, err := suite.connector.ExchangeDataCollection("dustina@8qzvrj.onmicrosoft.com") exchangeData, err := suite.connector.ExchangeDataCollection("lidiah@8qzvrj.onmicrosoft.com")
assert.NotNil(suite.T(), exchangeData) assert.NotNil(suite.T(), exchangeData)
assert.Error(suite.T(), err) // TODO Remove after https://github.com/alcionai/corso/issues/140 assert.Error(suite.T(), err) // TODO Remove after https://github.com/alcionai/corso/issues/140
suite.T().Logf("Missing Data: %s\n", err.Error()) suite.T().Logf("Missing Data: %s\n", err.Error())