Qualify tenant-scoped bootstrap rotation and fresh Windows scripting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { windowsUpdateScriptHash } from './script-console';
|
||||
import { expect, it, vi } from 'vitest';
|
||||
import { renderToStaticMarkup } from 'react-dom/server';
|
||||
import { ConsoleOutput, outputBytes, outputText } from './console-output';
|
||||
@@ -25,3 +26,14 @@ it('distinguishes no result, empty bytes, invalid encoding, invalid bytes and mi
|
||||
const bytes = outputBytes([239, 187, 191, 65, 13, 10]);
|
||||
expect(outputText(bytes).text).toBe('\\ufeffA\\u000d\n'); expect(Array.from(bytes)).toEqual([239, 187, 191, 65, 13, 10]);
|
||||
});
|
||||
|
||||
it('shows unknown restart state for an incomplete Windows Update summary', () => {
|
||||
function rendered(hash: string) {
|
||||
const result = { stdout: [], stderr: [], reboot_required: false, evidence: {
|
||||
script_sha256: hash, windows_update_reboot_required: null
|
||||
}};
|
||||
return renderToStaticMarkup(<ConsoleOutput job={{ result }}/>);
|
||||
}
|
||||
expect(rendered(windowsUpdateScriptHash)).toContain('Neustartbedarf: unknown');
|
||||
expect(rendered('ordinary script')).toContain('Neustartbedarf: false');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user