-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gnanakeethan Balasubramaniam <[email protected]>
- Loading branch information
1 parent
af4514a
commit ad696ea
Showing
2 changed files
with
41 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
import {describe, expect, jest, test} from '@jest/globals'; | ||
import {CloudInstanceMetadataModel} from './index'; | ||
|
||
jest.setTimeout(30000); | ||
|
||
describe('ccf:configure test', () => { | ||
test('initialize and test', async () => { | ||
const model = await new CloudInstanceMetadataModel().configure('ccf', {}); | ||
expect(model).toBeInstanceOf(CloudInstanceMetadataModel); | ||
await expect( | ||
model.calculate([ | ||
{ | ||
'cloud-instance-type': 't2.micro', | ||
'cloud-vendor': 'aws', | ||
}, | ||
]) | ||
).resolves.toStrictEqual( | ||
expect.arrayContaining([ | ||
{ | ||
'cloud-instance-type': 't2.micro', | ||
'cloud-vendor': 'aws', | ||
'physical-processor': 'Intel Xeon E5-2676 v3', | ||
'vcpus-allocated': '1', | ||
'vcpus-total': '48', | ||
}, | ||
]) | ||
); | ||
}); | ||
}); |
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