2024-09-17 17:40:00 +00:00
|
|
|
import { tap, expect } from '../ts/index.js';
|
|
|
|
|
|
|
|
import { tapNodeTools } from '../ts_node/index.js';
|
|
|
|
|
|
|
|
tap.test('should execure a command', async () => {
|
|
|
|
const result = await tapNodeTools.runCommand('ls -la');
|
|
|
|
expect(result.exitCode).toEqual(0);
|
|
|
|
});
|
|
|
|
|
2024-09-17 22:41:14 +00:00
|
|
|
tap.test('should create a https cert', async () => {
|
2024-09-17 22:45:50 +00:00
|
|
|
const { key, cert } = await tapNodeTools.createHttpsCert('localhost');
|
2024-09-17 22:41:14 +00:00
|
|
|
console.log(key);
|
|
|
|
console.log(cert);
|
2024-09-18 15:56:53 +00:00
|
|
|
expect(key).toInclude('-----BEGIN RSA PRIVATE KEY-----');
|
2024-09-17 22:41:14 +00:00
|
|
|
expect(cert).toInclude('-----BEGIN CERTIFICATE-----');
|
|
|
|
});
|
|
|
|
|
2024-11-06 01:46:34 +00:00
|
|
|
tap.test('should create a smartmongo instance', async () => {
|
|
|
|
const smartmongo = await tapNodeTools.createSmartmongo();
|
|
|
|
await smartmongo.stop();
|
|
|
|
});
|
|
|
|
|
|
|
|
tap.test('should create a smarts3 instance', async () => {
|
|
|
|
const smarts3 = await tapNodeTools.createSmarts3();
|
|
|
|
await smarts3.stop();
|
|
|
|
});
|
|
|
|
|
2024-09-17 17:40:00 +00:00
|
|
|
tap.start();
|