File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,33 @@ func TestServiceLifecycleIntegration(t *testing.T) {
272272 t .Logf ("Service status: %v" , service .Status )
273273 })
274274
275+ t .Run ("ServiceLogs" , func (t * testing.T ) {
276+ if serviceID == "" {
277+ t .Skip ("No service ID available from create test" )
278+ }
279+
280+ t .Logf ("Fetching logs for service: %s" , serviceID )
281+
282+ output , err := executeIntegrationCommand (
283+ t .Context (),
284+ "service" , "logs" , serviceID ,
285+ )
286+
287+ if err != nil {
288+ t .Fatalf ("Service logs failed: %v\n Output: %s" , err , output )
289+ }
290+
291+ // Verify at least one expected log line is present
292+ // PostgreSQL services should have logs about starting the database
293+ if ! strings .Contains (output , "starting PostgreSQL" ) &&
294+ ! strings .Contains (output , "database system is ready" ) &&
295+ ! strings .Contains (output , "PostgreSQL" ) {
296+ t .Errorf ("Expected to see PostgreSQL-related log lines in output: %s" , output )
297+ }
298+
299+ t .Logf ("✅ Service logs fetched successfully" )
300+ })
301+
275302 t .Run ("DatabasePsqlCommand_OriginalPassword" , func (t * testing.T ) {
276303 if serviceID == "" {
277304 t .Skip ("No service ID available from create test" )
You can’t perform that action at this time.
0 commit comments