Skip to content

Commit 6ec6e74

Browse files
committed
chore: wip
1 parent 01b669b commit 6ec6e74

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/launchpad/test/services.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ import { createDefaultServiceConfig, getAllServiceDefinitions, getServiceDefinit
88
import { disableService, enableService, getServiceStatus, initializeServiceManager, listServices, restartService, startService, stopService } from '../src/services/manager'
99
import { generateLaunchdPlist, generateSystemdService, getServiceManagerName, isPlatformSupported } from '../src/services/platform'
1010

11-
// Helper function to detect if we're in a CI environment
11+
// Helper function to detect if we're in a CI environment where services aren't available
1212
function isRunningInCI(): boolean {
1313
return process.env.CI === 'true'
1414
|| process.env.GITHUB_ACTIONS === 'true'
1515
|| process.env.RUNNER_OS !== undefined
1616
|| process.env.GITHUB_RUN_ID !== undefined
17-
// Check if PostgreSQL tools are actually available
18-
|| !process.env.PATH?.includes('/usr/bin')
19-
|| process.env.NODE_ENV === 'test' // Fallback for test environments
2017
}
2118

2219
describe('Service Management', () => {
@@ -501,7 +498,7 @@ describe('Service Management', () => {
501498
}
502499

503500
// Skip actual service operations in CI where services aren't installed
504-
if (process.env.CI || process.env.GITHUB_ACTIONS) {
501+
if (isRunningInCI()) {
505502
const serviceName = 'redis'
506503
expect(serviceName).toBe('redis')
507504
return
@@ -568,7 +565,7 @@ describe('Service Management', () => {
568565
}
569566

570567
// Skip actual service operations in CI where services aren't installed
571-
if (process.env.CI || process.env.GITHUB_ACTIONS) {
568+
if (isRunningInCI()) {
572569
// Just test configuration setting without actually starting services
573570
const mockConfig = {
574571
'maxmemory': '128mb',
@@ -612,7 +609,7 @@ describe('Service Management', () => {
612609
expect(isPlatformSupported()).toBe(true)
613610

614611
// Skip actual service operations in CI where services aren't installed
615-
if (process.env.CI || process.env.GITHUB_ACTIONS) {
612+
if (isRunningInCI()) {
616613
// Just test that we can import and call the platform check
617614
expect(isPlatformSupported()).toBe(true)
618615
}

0 commit comments

Comments
 (0)