-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds universe_domain field to base external client (#1548)
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,6 +283,26 @@ describe('BaseExternalAccountClient', () => { | |
}); | ||
}); | ||
|
||
describe('universeDomain', () => { | ||
it('should be undefined if not set', () => { | ||
const client = new TestExternalAccountClient(externalAccountOptions); | ||
|
||
assert(client.universeDomain === undefined); | ||
}); | ||
|
||
it('should be set if provided', () => { | ||
const universeDomain = 'universe.domain.com'; | ||
const options: BaseExternalAccountClientOptions = Object.assign( | ||
{}, | ||
externalAccountOptions | ||
); | ||
options.universe_domain = universeDomain; | ||
const client = new TestExternalAccountClient(options); | ||
|
||
assert.equal(client.universeDomain, universeDomain); | ||
}); | ||
}); | ||
|
||
describe('getServiceAccountEmail()', () => { | ||
it('should return the service account email when impersonation is used', () => { | ||
const saEmail = '[email protected]'; | ||
|