diff options
Diffstat (limited to 'packages/shared/src/stores/__tests__/__fixtures__/serviceFixtures.ts')
-rw-r--r-- | packages/shared/src/stores/__tests__/__fixtures__/serviceFixtures.ts | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/packages/shared/src/stores/__tests__/__fixtures__/serviceFixtures.ts b/packages/shared/src/stores/__tests__/__fixtures__/serviceFixtures.ts new file mode 100644 index 0000000..33e2f90 --- /dev/null +++ b/packages/shared/src/stores/__tests__/__fixtures__/serviceFixtures.ts | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2022 Kristóf Marussy <kristof@marussy.com> | ||
3 | * | ||
4 | * This file is part of Sophie. | ||
5 | * | ||
6 | * Sophie is free software: you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU Affero General Public License as | ||
8 | * published by the Free Software Foundation, version 3. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU Affero General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU Affero General Public License | ||
16 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
17 | * | ||
18 | * SPDX-License-Identifier: AGPL-3.0-only | ||
19 | */ | ||
20 | |||
21 | import type { SnapshotIn } from 'mobx-state-tree'; | ||
22 | |||
23 | import type Certificate from '../../Certificate.js'; | ||
24 | import type Profile from '../../Profile.js'; | ||
25 | import type ServiceBase from '../../ServiceBase.js'; | ||
26 | |||
27 | export const testProfile: SnapshotIn<typeof Profile> = { | ||
28 | id: 'testProfile', | ||
29 | settings: { | ||
30 | name: 'test profile', | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | export const testService: SnapshotIn<typeof ServiceBase> = { | ||
35 | id: 'testService', | ||
36 | settings: { | ||
37 | name: 'testService', | ||
38 | url: 'https://example.org', | ||
39 | profile: testProfile.id, | ||
40 | }, | ||
41 | }; | ||
42 | |||
43 | export const testCertificate: SnapshotIn<typeof Certificate> = { | ||
44 | data: '-----TEST DATA-----', | ||
45 | issuer: { | ||
46 | commonName: 'Test issuer', | ||
47 | country: '', | ||
48 | state: '', | ||
49 | locality: '', | ||
50 | }, | ||
51 | issuerName: 'Test issuer', | ||
52 | subject: { | ||
53 | commonName: 'Test subject', | ||
54 | country: '', | ||
55 | state: '', | ||
56 | locality: '', | ||
57 | }, | ||
58 | subjectName: 'Test subject', | ||
59 | serialNumber: '123456', | ||
60 | validStart: 1_653_551_516, | ||
61 | validExpiry: 1_685_087_516, | ||
62 | fingerprint: 'sha256/KUIHdVkSTzYmb2PGMotOPDm2ir52G1QyPW6rt6wUjZ0=', | ||
63 | }; | ||