Skip to content

Commit

Permalink
ci: use a mock instead of the actual file
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Nov 18, 2024
1 parent cf24d23 commit 0393d84
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_restore_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ set -e
TEST_DIR=$(mktemp -d)
cd "$TEST_DIR"

# Copy the example snapshot file from project root with a unique test name
cp ../test_resources/example_snapshot.json ./test_restore_snapshot_temporary.json
# Create a minimal mock snapshot file
cat > test_restore_snapshot_temporary.json << 'EOF'
{
"comfyui": "test-hash",
"git_custom_nodes": {},
"file_custom_nodes": [],
"pips": {}
}
EOF

# Create a mock comfy command that simulates the real comfy behavior
cat > comfy << 'EOF'
Expand Down Expand Up @@ -41,5 +48,4 @@ fi

# Clean up
rm -rf "$TEST_DIR"
rm -f ../test_restore_snapshot_temporary.json # Remove the test snapshot file from root directory

0 comments on commit 0393d84

Please sign in to comment.