Skip to content

test(cli): add integration test for prompt update auto-parent behavior #733

@codekiln

Description

@codekiln

Summary

Add CLI integration test for auto-parent behavior when updating existing prompts.

Context

PR #723 implemented auto-parent as default behavior for prompt push updates. While SDK tests cover the get_commit() method and CLI tests cover single push operations, there's no integration test for the update scenario.

Requirements

Add test to cli/tests/prompt_structured_test.rs that:

  1. Pushes a structured prompt to a new repository (first commit)
  2. Pushes again to the same repository with updated content
  3. Verifies the second push succeeds without 409 conflict
  4. Verifies auto-parent logic fetched and used the first commit's hash

Test Structure

#[test]
fn test_cli_push_prompt_update_with_auto_parent() {
    // Setup: unique repo name, test credentials
    // Step 1: Push initial prompt
    // Step 2: Push update to same repo
    // Step 3: Assert both succeeded
    // Cleanup: delete test repo
}

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions