Fix test failures when run without env vars (#2356)

## Description

Either skip tests that require env vars or have them use mock credentials if they don't need access to external services.

## Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No 

## Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

## Issue(s)

* closes #2354

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-02-04 14:17:21 -08:00 committed by GitHub
parent 438bcd78ed
commit c4b2de5c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -22,7 +22,7 @@ func TestBetaUnitSuite(t *testing.T) {
func (suite *BetaUnitSuite) TestBetaService_Adapter() {
t := suite.T()
a := tester.NewM365Account(t)
a := tester.NewMockM365Account(t)
m365, err := a.M365Config()
require.NoError(t, err)

View File

@ -18,6 +18,12 @@ type BetaClientSuite struct {
}
func TestBetaClientSuite(t *testing.T) {
tester.RunOnAny(
t,
tester.CorsoCITests,
tester.CorsoGraphConnectorTests,
)
suite.Run(t, new(BetaClientSuite))
}