Skip to content

Conversation

@tnikolova82
Copy link
Contributor

Make "no start command" test platform-aware for CF compatibility

What

Updates integration test to work on both Docker and CF platforms
Adds platform-specific assertions for error checking
Makes cleanup handler more robust for failed deployments

Why

The "there is no start command given" test was previously skipped on CF platform because it used Docker-specific commands (docker container logs). This prevented proper test coverage when running integration tests against Cloud Foundry environments.

Without this change:

  • Test is skipped on CF platform, reducing test coverage
  • No validation that apps without start commands fail properly on CF
  • Integration test suite incomplete when run with SWITCHBLADE_PLATFORM=cf

How

Platform-specific test logic:

  • Docker: Uses docker container logs to check for error message (existing behavior)
  • CF: Checks deployment failure or uses cf logs --recent to validate error message

Improved cleanup:

  • Added null check for app name before attempting deletion
  • Removed strict expectation on cleanup success to handle failed deployments gracefully

Testing:

  • Test now runs on both Docker and CF platforms
  • Properly validates that apps without start commands fail with appropriate error messages
  • Cleanup no longer fails when deployment didn't succeed

@tnikolova82 tnikolova82 requested a review from ivanovac December 19, 2025 08:58
Copy link

@ivanovac ivanovac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnikolova82 tnikolova82 merged commit 2aa89e1 into master Dec 19, 2025
7 checks passed
@tnikolova82 tnikolova82 deleted the integtest branch December 19, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants