mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-12 19:25:17 +00:00
update tests
This commit is contained in:
parent
314959985b
commit
bda9ae9977
@ -101,7 +101,7 @@ export enum WorkloadType {
|
|||||||
Learning = "Learning",
|
Learning = "Learning",
|
||||||
DevelopmentTesting = "Development/Testing",
|
DevelopmentTesting = "Development/Testing",
|
||||||
Production = "Production",
|
Production = "Production",
|
||||||
None = "None"
|
None = "None",
|
||||||
}
|
}
|
||||||
// flight names returned from the portal are always lowercase
|
// flight names returned from the portal are always lowercase
|
||||||
export class Flights {
|
export class Flights {
|
||||||
|
@ -5,14 +5,22 @@ import { updateUserContext } from "UserContext";
|
|||||||
|
|
||||||
describe("Database Account Utility", () => {
|
describe("Database Account Utility", () => {
|
||||||
describe("Workload Type", () => {
|
describe("Workload Type", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
updateUserContext({
|
||||||
|
databaseAccount: {
|
||||||
|
tags: {} as Tags,
|
||||||
|
} as DatabaseAccount,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("Workload Type should return Learning", () => {
|
it("Workload Type should return Learning", () => {
|
||||||
updateUserContext({
|
updateUserContext({
|
||||||
databaseAccount: {
|
databaseAccount: {
|
||||||
tags: {
|
tags: {
|
||||||
"hidden-workload-type": WorkloadType.Learning
|
"hidden-workload-type": WorkloadType.Learning,
|
||||||
} as Tags
|
} as Tags,
|
||||||
} as DatabaseAccount
|
} as DatabaseAccount,
|
||||||
})
|
});
|
||||||
|
|
||||||
const workloadType: WorkloadType = getWorkloadType();
|
const workloadType: WorkloadType = getWorkloadType();
|
||||||
expect(workloadType).toBe(WorkloadType.Learning);
|
expect(workloadType).toBe(WorkloadType.Learning);
|
||||||
@ -22,5 +30,5 @@ describe("Database Account Utility", () => {
|
|||||||
const workloadType: WorkloadType = getWorkloadType();
|
const workloadType: WorkloadType = getWorkloadType();
|
||||||
expect(workloadType).toBe(WorkloadType.None);
|
expect(workloadType).toBe(WorkloadType.None);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user