Compare commits
22 Commits
550135ca37
...
v1.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 9295354e72 | |||
| 372cda6a58 | |||
| 3301e942ef | |||
| c4ebb76deb | |||
| bb765453ab | |||
| 88474d1048 | |||
| 954d85ca81 | |||
| 117dfc5f17 | |||
| c39c7a8aef | |||
| a934db1a14 | |||
| ea4c5f7c95 | |||
| 5c12acb6c7 | |||
| 0b350f3b28 | |||
| db4071a2cf | |||
| 37cd77850e | |||
| 14a4826bb6 | |||
| 07cef73fae | |||
| e3d089a71f | |||
| 120b61a423 | |||
| cd16b7ea28 | |||
| afbdefa549 | |||
| f1e192c5d4 |
26
index.html
26
index.html
@@ -98,6 +98,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JOBS PAGE -->
|
||||
<div class="page" id="page-jobs">
|
||||
<div class="jobs-layout">
|
||||
<div class="jobs-sidebar">
|
||||
<div class="jobs-sidebar-title">Jobs</div>
|
||||
<div id="jobs-list"></div>
|
||||
</div>
|
||||
<div class="jobs-detail" id="jobs-detail">
|
||||
<div class="jobs-placeholder">Select a job</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -172,19 +185,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JOBS PAGE -->
|
||||
<div class="page" id="page-jobs">
|
||||
<div class="jobs-layout">
|
||||
<div class="jobs-sidebar">
|
||||
<div class="jobs-sidebar-title">Jobs</div>
|
||||
<div id="jobs-list"></div>
|
||||
</div>
|
||||
<div class="jobs-detail" id="jobs-detail">
|
||||
<div class="jobs-placeholder">Select a job</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SETTINGS MODAL -->
|
||||
<div id="settings-modal" class="modal-overlay">
|
||||
<div class="modal">
|
||||
|
||||
34
js/ui.js
34
js/ui.js
@@ -382,15 +382,17 @@ async function importDB() {
|
||||
document.getElementById('confirm-ok').onclick = async () => {
|
||||
closeConfirm();
|
||||
try {
|
||||
const { instances, history = [] } = JSON.parse(await file.text());
|
||||
const { instances, history = [], jobs, job_runs } = JSON.parse(await file.text());
|
||||
const res = await fetch('/api/import', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ instances, history }),
|
||||
body: JSON.stringify({ instances, history, jobs, job_runs }),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!res.ok) { showToast(data.error ?? 'Import failed', 'error'); return; }
|
||||
showToast(`Imported ${data.imported} instance${data.imported !== 1 ? 's' : ''}`, 'success');
|
||||
const parts = [`${data.imported} instance${data.imported !== 1 ? 's' : ''}`];
|
||||
if (data.imported_jobs != null) parts.push(`${data.imported_jobs} job${data.imported_jobs !== 1 ? 's' : ''}`);
|
||||
showToast(`Imported ${parts.join(', ')}`, 'success');
|
||||
closeSettingsModal();
|
||||
renderDashboard();
|
||||
} catch {
|
||||
@@ -483,6 +485,20 @@ function _renderJobConfigFields(key, cfg) {
|
||||
<input class="form-input" id="job-cfg-api-key" type="password"
|
||||
placeholder="tskey-api-…" value="${esc(cfg.api_key ?? '')}">
|
||||
</div>`;
|
||||
if (key === 'patchmon_sync' || key === 'semaphore_sync') {
|
||||
const label = key === 'semaphore_sync' ? 'API Token (Bearer)' : 'API Token (Basic)';
|
||||
return `
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="job-cfg-api-url">API URL</label>
|
||||
<input class="form-input" id="job-cfg-api-url" type="text"
|
||||
value="${esc(cfg.api_url ?? '')}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="job-cfg-api-token">${label}</label>
|
||||
<input class="form-input" id="job-cfg-api-token" type="password"
|
||||
value="${esc(cfg.api_token ?? '')}">
|
||||
</div>`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -501,10 +517,14 @@ async function saveJobDetail(jobId) {
|
||||
const enabled = document.getElementById('job-enabled').checked;
|
||||
const schedule = document.getElementById('job-schedule').value;
|
||||
const cfg = {};
|
||||
const tailnet = document.getElementById('job-cfg-tailnet');
|
||||
const apiKey = document.getElementById('job-cfg-api-key');
|
||||
if (tailnet) cfg.tailnet = tailnet.value.trim();
|
||||
if (apiKey) cfg.api_key = apiKey.value;
|
||||
const tailnet = document.getElementById('job-cfg-tailnet');
|
||||
const apiKey = document.getElementById('job-cfg-api-key');
|
||||
const apiUrl = document.getElementById('job-cfg-api-url');
|
||||
const apiToken = document.getElementById('job-cfg-api-token');
|
||||
if (tailnet) cfg.tailnet = tailnet.value.trim();
|
||||
if (apiKey) cfg.api_key = apiKey.value;
|
||||
if (apiUrl) cfg.api_url = apiUrl.value.trim();
|
||||
if (apiToken) cfg.api_token = apiToken.value;
|
||||
const res = await fetch(`/api/jobs/${jobId}`, {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
@@ -1 +1 @@
|
||||
const VERSION = "1.4.0";
|
||||
const VERSION = "1.5.0";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "catalyst",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "node server/server.js",
|
||||
|
||||
55
server/db.js
55
server/db.js
@@ -109,18 +109,26 @@ function seed() {
|
||||
}
|
||||
|
||||
function seedJobs() {
|
||||
const count = db.prepare('SELECT COUNT(*) as n FROM jobs').get().n;
|
||||
if (count > 0) return;
|
||||
const upsert = db.prepare(`
|
||||
INSERT OR IGNORE INTO jobs (key, name, description, enabled, schedule, config)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
`);
|
||||
|
||||
const apiKey = getConfig('tailscale_api_key');
|
||||
const tailnet = getConfig('tailscale_tailnet');
|
||||
const schedule = parseInt(getConfig('tailscale_poll_minutes', '15'), 10) || 15;
|
||||
const enabled = getConfig('tailscale_enabled') === '1' ? 1 : 0;
|
||||
db.prepare(`
|
||||
INSERT INTO jobs (key, name, description, enabled, schedule, config)
|
||||
VALUES ('tailscale_sync', 'Tailscale Sync',
|
||||
'Syncs Tailscale device status and IPs to instances by matching hostnames.',
|
||||
?, ?, ?)
|
||||
`).run(enabled, schedule, JSON.stringify({ api_key: apiKey, tailnet }));
|
||||
const tsSchedule = parseInt(getConfig('tailscale_poll_minutes', '15'), 10) || 15;
|
||||
const tsEnabled = getConfig('tailscale_enabled') === '1' ? 1 : 0;
|
||||
upsert.run('tailscale_sync', 'Tailscale Sync',
|
||||
'Syncs Tailscale device status and IPs to instances by matching hostnames.',
|
||||
tsEnabled, tsSchedule, JSON.stringify({ api_key: apiKey, tailnet }));
|
||||
|
||||
upsert.run('patchmon_sync', 'Patchmon Sync',
|
||||
'Syncs Patchmon host registration status to instances by matching hostnames.',
|
||||
0, 60, JSON.stringify({ api_url: 'http://patchmon:3000/api/v1/api/hosts', api_token: '' }));
|
||||
|
||||
upsert.run('semaphore_sync', 'Semaphore Sync',
|
||||
'Syncs Semaphore inventory membership to instances by matching hostnames.',
|
||||
0, 60, JSON.stringify({ api_url: 'http://semaphore:3000/api/project/1/inventory/1', api_token: '' }));
|
||||
}
|
||||
|
||||
// ── Queries ───────────────────────────────────────────────────────────────────
|
||||
@@ -227,6 +235,33 @@ export function getAllHistory() {
|
||||
return db.prepare('SELECT * FROM instance_history ORDER BY vmid, changed_at').all();
|
||||
}
|
||||
|
||||
export function getAllJobs() {
|
||||
return db.prepare('SELECT id, key, name, description, enabled, schedule, config FROM jobs ORDER BY id').all();
|
||||
}
|
||||
|
||||
export function getAllJobRuns() {
|
||||
return db.prepare('SELECT * FROM job_runs ORDER BY job_id, id').all();
|
||||
}
|
||||
|
||||
export function importJobs(jobRows, jobRunRows = []) {
|
||||
db.exec('BEGIN');
|
||||
db.exec('DELETE FROM job_runs');
|
||||
db.exec('DELETE FROM jobs');
|
||||
const insertJob = db.prepare(`
|
||||
INSERT INTO jobs (id, key, name, description, enabled, schedule, config)
|
||||
VALUES (@id, @key, @name, @description, @enabled, @schedule, @config)
|
||||
`);
|
||||
for (const j of jobRows) insertJob.run(j);
|
||||
if (jobRunRows.length) {
|
||||
const insertRun = db.prepare(`
|
||||
INSERT INTO job_runs (id, job_id, started_at, ended_at, status, result)
|
||||
VALUES (@id, @job_id, @started_at, @ended_at, @status, @result)
|
||||
`);
|
||||
for (const r of jobRunRows) insertRun.run(r);
|
||||
}
|
||||
db.exec('COMMIT');
|
||||
}
|
||||
|
||||
export function getConfig(key, defaultVal = '') {
|
||||
const row = db.prepare('SELECT value FROM config WHERE key = ?').get(key);
|
||||
return row ? row.value : defaultVal;
|
||||
|
||||
@@ -35,10 +35,77 @@ async function tailscaleSyncHandler(cfg) {
|
||||
return { summary: `${updated} updated of ${instances.length}` };
|
||||
}
|
||||
|
||||
// ── Patchmon Sync ─────────────────────────────────────────────────────────────
|
||||
|
||||
async function patchmonSyncHandler(cfg) {
|
||||
const { api_url, api_token } = cfg;
|
||||
if (!api_url || !api_token) throw new Error('Patchmon not configured — set API URL and token');
|
||||
|
||||
const res = await fetch(api_url, {
|
||||
headers: { Authorization: `Basic ${api_token}` },
|
||||
});
|
||||
if (!res.ok) throw new Error(`Patchmon API ${res.status}`);
|
||||
|
||||
const data = await res.json();
|
||||
const items = Array.isArray(data) ? data : (data.hosts ?? data.data ?? []);
|
||||
const hostSet = new Set(
|
||||
items.map(h => (typeof h === 'string' ? h : (h.name ?? h.hostname ?? h.host ?? '')))
|
||||
.filter(Boolean)
|
||||
);
|
||||
|
||||
const instances = getInstances();
|
||||
let updated = 0;
|
||||
for (const inst of instances) {
|
||||
const newPatchmon = hostSet.has(inst.name) ? 1 : 0;
|
||||
if (newPatchmon !== inst.patchmon) {
|
||||
const { id: _id, created_at: _ca, updated_at: _ua, ...instData } = inst;
|
||||
updateInstance(inst.vmid, { ...instData, patchmon: newPatchmon });
|
||||
updated++;
|
||||
}
|
||||
}
|
||||
return { summary: `${updated} updated of ${instances.length}` };
|
||||
}
|
||||
|
||||
// ── Semaphore Sync ────────────────────────────────────────────────────────────
|
||||
|
||||
async function semaphoreSyncHandler(cfg) {
|
||||
const { api_url, api_token } = cfg;
|
||||
if (!api_url || !api_token) throw new Error('Semaphore not configured — set API URL and token');
|
||||
|
||||
const res = await fetch(api_url, {
|
||||
headers: { Authorization: `Bearer ${api_token}` },
|
||||
});
|
||||
if (!res.ok) throw new Error(`Semaphore API ${res.status}`);
|
||||
|
||||
const data = await res.json();
|
||||
// Inventory is an Ansible INI string; extract bare hostnames
|
||||
const hostSet = new Set(
|
||||
(data.inventory ?? '').split('\n')
|
||||
.map(l => l.trim())
|
||||
.filter(l => l && !l.startsWith('[') && !l.startsWith('#') && !l.startsWith(';'))
|
||||
.map(l => l.split(/[\s=]/)[0])
|
||||
.filter(Boolean)
|
||||
);
|
||||
|
||||
const instances = getInstances();
|
||||
let updated = 0;
|
||||
for (const inst of instances) {
|
||||
const newSemaphore = hostSet.has(inst.name) ? 1 : 0;
|
||||
if (newSemaphore !== inst.semaphore) {
|
||||
const { id: _id, created_at: _ca, updated_at: _ua, ...instData } = inst;
|
||||
updateInstance(inst.vmid, { ...instData, semaphore: newSemaphore });
|
||||
updated++;
|
||||
}
|
||||
}
|
||||
return { summary: `${updated} updated of ${instances.length}` };
|
||||
}
|
||||
|
||||
// ── Registry ──────────────────────────────────────────────────────────────────
|
||||
|
||||
const HANDLERS = {
|
||||
tailscale_sync: tailscaleSyncHandler,
|
||||
tailscale_sync: tailscaleSyncHandler,
|
||||
patchmon_sync: patchmonSyncHandler,
|
||||
semaphore_sync: semaphoreSyncHandler,
|
||||
};
|
||||
|
||||
// ── Public API ────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
getInstances, getInstance, getDistinctStacks,
|
||||
createInstance, updateInstance, deleteInstance, importInstances, getInstanceHistory, getAllHistory,
|
||||
getConfig, setConfig, getJobs, getJob, updateJob, getJobRuns,
|
||||
getAllJobs, getAllJobRuns, importJobs,
|
||||
} from './db.js';
|
||||
import { runJob, restartJobs } from './jobs.js';
|
||||
|
||||
@@ -18,7 +19,8 @@ const REDACTED = '**REDACTED**';
|
||||
|
||||
function maskJob(job) {
|
||||
const cfg = JSON.parse(job.config || '{}');
|
||||
if (cfg.api_key) cfg.api_key = REDACTED;
|
||||
if (cfg.api_key) cfg.api_key = REDACTED;
|
||||
if (cfg.api_token) cfg.api_token = REDACTED;
|
||||
return { ...job, config: cfg };
|
||||
}
|
||||
|
||||
@@ -126,15 +128,17 @@ router.put('/instances/:vmid', (req, res) => {
|
||||
// GET /api/export
|
||||
router.get('/export', (_req, res) => {
|
||||
const instances = getInstances();
|
||||
const history = getAllHistory();
|
||||
const history = getAllHistory();
|
||||
const jobs = getAllJobs();
|
||||
const job_runs = getAllJobRuns();
|
||||
const date = new Date().toISOString().slice(0, 10);
|
||||
res.setHeader('Content-Disposition', `attachment; filename="catalyst-backup-${date}.json"`);
|
||||
res.json({ version: 2, exported_at: new Date().toISOString(), instances, history });
|
||||
res.json({ version: 3, exported_at: new Date().toISOString(), instances, history, jobs, job_runs });
|
||||
});
|
||||
|
||||
// POST /api/import
|
||||
router.post('/import', (req, res) => {
|
||||
const { instances, history = [] } = req.body ?? {};
|
||||
const { instances, history = [], jobs, job_runs } = req.body ?? {};
|
||||
if (!Array.isArray(instances)) {
|
||||
return res.status(400).json({ error: 'body must contain an instances array' });
|
||||
}
|
||||
@@ -146,7 +150,14 @@ router.post('/import', (req, res) => {
|
||||
if (errors.length) return res.status(400).json({ errors });
|
||||
try {
|
||||
importInstances(instances.map(normalise), Array.isArray(history) ? history : []);
|
||||
res.json({ imported: instances.length });
|
||||
if (Array.isArray(jobs)) {
|
||||
importJobs(jobs, Array.isArray(job_runs) ? job_runs : []);
|
||||
try { restartJobs(); } catch (e) { console.error('POST /api/import restartJobs', e); }
|
||||
}
|
||||
res.json({
|
||||
imported: instances.length,
|
||||
imported_jobs: Array.isArray(jobs) ? jobs.length : undefined,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('POST /api/import', e);
|
||||
res.status(500).json({ error: 'internal server error' });
|
||||
@@ -194,7 +205,8 @@ router.put('/jobs/:id', (req, res) => {
|
||||
const { enabled, schedule, config: newCfg } = req.body ?? {};
|
||||
const existingCfg = JSON.parse(job.config || '{}');
|
||||
const mergedCfg = { ...existingCfg, ...(newCfg ?? {}) };
|
||||
if (newCfg?.api_key === REDACTED) mergedCfg.api_key = existingCfg.api_key;
|
||||
if (newCfg?.api_key === REDACTED) mergedCfg.api_key = existingCfg.api_key;
|
||||
if (newCfg?.api_token === REDACTED) mergedCfg.api_token = existingCfg.api_token;
|
||||
updateJob(id, {
|
||||
enabled: enabled != null ? (enabled ? 1 : 0) : job.enabled,
|
||||
schedule: schedule != null ? (parseInt(schedule, 10) || 15) : job.schedule,
|
||||
|
||||
@@ -276,9 +276,9 @@ describe('GET /api/export', () => {
|
||||
expect(res.body.instances).toEqual([])
|
||||
})
|
||||
|
||||
it('returns version 2', async () => {
|
||||
it('returns version 3', async () => {
|
||||
const res = await request(app).get('/api/export')
|
||||
expect(res.body.version).toBe(2)
|
||||
expect(res.body.version).toBe(3)
|
||||
})
|
||||
|
||||
it('includes a history array', async () => {
|
||||
@@ -287,6 +287,21 @@ describe('GET /api/export', () => {
|
||||
expect(res.body.history).toBeInstanceOf(Array)
|
||||
expect(res.body.history.some(e => e.field === 'created')).toBe(true)
|
||||
})
|
||||
|
||||
it('includes jobs and job_runs arrays', async () => {
|
||||
createJob(testJob)
|
||||
const res = await request(app).get('/api/export')
|
||||
expect(res.body.jobs).toBeInstanceOf(Array)
|
||||
expect(res.body.jobs).toHaveLength(1)
|
||||
expect(res.body.jobs[0].key).toBe('tailscale_sync')
|
||||
expect(res.body.job_runs).toBeInstanceOf(Array)
|
||||
})
|
||||
|
||||
it('exports raw job config without masking', async () => {
|
||||
createJob(testJob)
|
||||
const res = await request(app).get('/api/export')
|
||||
expect(res.body.jobs[0].config).toContain('tskey-test')
|
||||
})
|
||||
})
|
||||
|
||||
// ── POST /api/import ──────────────────────────────────────────────────────────
|
||||
@@ -341,6 +356,28 @@ describe('POST /api/import', () => {
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.body.imported).toBe(1)
|
||||
})
|
||||
|
||||
it('imports jobs and job_runs and returns imported_jobs count', async () => {
|
||||
const exp = await request(app).get('/api/export')
|
||||
createJob(testJob)
|
||||
const fullExport = await request(app).get('/api/export')
|
||||
const res = await request(app).post('/api/import').send({
|
||||
instances: fullExport.body.instances,
|
||||
history: fullExport.body.history,
|
||||
jobs: fullExport.body.jobs,
|
||||
job_runs: fullExport.body.job_runs,
|
||||
})
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.body.imported_jobs).toBe(1)
|
||||
expect((await request(app).get('/api/jobs')).body).toHaveLength(1)
|
||||
})
|
||||
|
||||
it('leaves jobs untouched when no jobs key in payload', async () => {
|
||||
createJob(testJob)
|
||||
await request(app).post('/api/import')
|
||||
.send({ instances: [{ ...base, vmid: 1, name: 'x' }] })
|
||||
expect((await request(app).get('/api/jobs')).body).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
|
||||
// ── Static assets & SPA routing ───────────────────────────────────────────────
|
||||
@@ -460,6 +497,12 @@ const testJob = {
|
||||
config: JSON.stringify({ api_key: 'tskey-test', tailnet: 'example.com' }),
|
||||
}
|
||||
|
||||
const patchmonJob = {
|
||||
key: 'patchmon_sync', name: 'Patchmon Sync', description: 'Test patchmon job',
|
||||
enabled: 0, schedule: 60,
|
||||
config: JSON.stringify({ api_url: 'http://patchmon:3000/api/v1/api/hosts', api_token: 'secret-token' }),
|
||||
}
|
||||
|
||||
// ── GET /api/jobs ─────────────────────────────────────────────────────────────
|
||||
|
||||
describe('GET /api/jobs', () => {
|
||||
@@ -475,6 +518,12 @@ describe('GET /api/jobs', () => {
|
||||
expect(res.body).toHaveLength(1)
|
||||
expect(res.body[0].config.api_key).toBe('**REDACTED**')
|
||||
})
|
||||
|
||||
it('returns jobs with masked api_token', async () => {
|
||||
createJob(patchmonJob)
|
||||
const res = await request(app).get('/api/jobs')
|
||||
expect(res.body[0].config.api_token).toBe('**REDACTED**')
|
||||
})
|
||||
})
|
||||
|
||||
// ── GET /api/jobs/:id ─────────────────────────────────────────────────────────
|
||||
@@ -554,4 +603,40 @@ describe('POST /api/jobs/:id/run', () => {
|
||||
const detail = await request(app).get(`/api/jobs/${id}`)
|
||||
expect(detail.body.runs[0].status).toBe('error')
|
||||
})
|
||||
|
||||
it('patchmon_sync: marks instances present in host list as patchmon=1', async () => {
|
||||
createJob(patchmonJob)
|
||||
const id = (await request(app).get('/api/jobs')).body[0].id
|
||||
vi.stubGlobal('fetch', vi.fn().mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => [{ name: 'plex' }, { name: 'traefik' }],
|
||||
}))
|
||||
const res = await request(app).post(`/api/jobs/${id}/run`)
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.body.summary).toMatch(/updated of/)
|
||||
})
|
||||
|
||||
it('patchmon_sync: returns 500 when API token is missing', async () => {
|
||||
createJob({ ...patchmonJob, config: JSON.stringify({ api_url: 'http://patchmon:3000/api/v1/api/hosts', api_token: '' }) })
|
||||
const id = (await request(app).get('/api/jobs')).body[0].id
|
||||
const res = await request(app).post(`/api/jobs/${id}/run`)
|
||||
expect(res.status).toBe(500)
|
||||
})
|
||||
|
||||
it('semaphore_sync: parses ansible inventory and updates instances', async () => {
|
||||
const semaphoreJob = {
|
||||
key: 'semaphore_sync', name: 'Semaphore Sync', description: 'test',
|
||||
enabled: 0, schedule: 60,
|
||||
config: JSON.stringify({ api_url: 'http://semaphore:3000/api/project/1/inventory/1', api_token: 'bearer-token' }),
|
||||
}
|
||||
createJob(semaphoreJob)
|
||||
const id = (await request(app).get('/api/jobs')).body[0].id
|
||||
vi.stubGlobal('fetch', vi.fn().mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => ({ inventory: '[production]\nplex\nhomeassistant\n' }),
|
||||
}))
|
||||
const res = await request(app).post(`/api/jobs/${id}/run`)
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.body.summary).toMatch(/updated of/)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user