Skip to content

Add E2E shell tests with SLAS auto-tenant creation and job body support#27

Merged
clavery merged 11 commits intomainfrom
feature/shell-e2e-tests
Jan 7, 2026
Merged

Add E2E shell tests with SLAS auto-tenant creation and job body support#27
clavery merged 11 commits intomainfrom
feature/shell-e2e-tests

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Jan 7, 2026

Summary

These tests are e2e using a single shell script to demonstrate a real world use case (this also serves as documentation) of "easy setup" while providing a secondary E2E regression testing workflow.

As part of running this this PR fixes a bunch of big and small issues with the commands and improves the DX.

  • Add comprehensive E2E shell test suite that exercises the full CLI workflow
  • Add --body flag to job run for system jobs with non-standard request schemas
  • Add automatic SLAS tenant creation when creating clients (with --[no-]create-tenant flag)
  • Fix various issues with JSON output, structured logging, and config handling

Changes

E2E Shell Tests

  • New e2e_cli_test.sh script that tests: sandbox creation, code deployment, site import, search indexing, SLAS client management, and shopper API access
  • GitHub Actions workflow (e2e-shell-tests.yml) that runs daily at 3 AM UTC
  • Test fixtures for site archive import (catalog, inventory, pricebook, site preferences)

Job Run Command

  • Add --body/-B flag for raw JSON request body (mutually exclusive with -P)
  • Enables running system jobs like sfcc-search-index-product-full-update that use non-standard schemas

SLAS Client Create Command

  • Automatically create SLAS tenant if it doesn't exist (enabled by default)
  • Add --[no-]create-tenant flag to control this behavior
  • Handle SLAS API returning 400 with TenantNotFoundException instead of 404

Bug Fixes

  • Fix JSON error output to go to stderr when --json flag is used
  • Add structured logging with context fields in ODS create command
  • Add hostname mismatch detection to ignore dw.json when explicit server differs
  • Add 2-second delay before first sandbox poll to avoid 404 errors

Documentation

  • Update job commands documentation with --body flag and system job examples
  • Update SLAS documentation with --create-tenant flag
  • Update CLI skills for job and SLAS topics

Test plan

  • Run E2E shell tests locally with valid credentials
  • Verify b2c job run sfcc-search-index-product-full-update --body '{"site_scope":["RefArch"]}' works
  • Verify b2c slas client create auto-creates tenant on new instances
  • Verify --no-create-tenant skips tenant creation
  • Verify JSON errors go to stderr with --json flag

@clavery clavery requested a review from charithaT07 January 7, 2026 03:14
@clavery clavery requested a review from yhsieh1 January 7, 2026 03:19
@clavery clavery merged commit 228feb3 into main Jan 7, 2026
3 checks passed
@clavery clavery deleted the feature/shell-e2e-tests branch January 27, 2026 01:24
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