Skip to content

Commit 232f391

Browse files
committed
test 31
Signed-off-by: Julio Jimenez <julio@clickhouse.com>
1 parent 65119b5 commit 232f391

File tree

1 file changed

+0
-57
lines changed

1 file changed

+0
-57
lines changed

test/advanced.bats

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,60 +2323,3 @@ EOF
23232323
local express_source=$(jq -r '. | select(.name == "express") | .source' "$output_file")
23242324
[ "$express_source" = "com.github.ClickHouse/clickhouse-js" ]
23252325
}
2326-
2327-
# ============================================================================
2328-
# TESTS FOR extract_sbom_source_reference AND collect_components_with_source
2329-
# Add these tests to the end of advanced.bats
2330-
# ============================================================================
2331-
2332-
# Test 124: Integration test - extract source and collect components work together
2333-
@test "integration test - extract source and collect components work together" {
2334-
# Create a realistic GitHub SBOM
2335-
local test_sbom="$TEST_TEMP_DIR/integration_sbom.json"
2336-
cat > "$test_sbom" << 'EOF'
2337-
{
2338-
"bomFormat": "CycloneDX",
2339-
"specVersion": "1.6",
2340-
"metadata": {
2341-
"properties": [
2342-
{
2343-
"name": "spdx:document:name",
2344-
"value": "com.github.ClickHouse/clickhouse-js"
2345-
}
2346-
]
2347-
},
2348-
"components": [
2349-
{
2350-
"name": "lodash",
2351-
"version": "4.17.21",
2352-
"type": "library"
2353-
},
2354-
{
2355-
"name": "express",
2356-
"version": "4.18.2",
2357-
"type": "library"
2358-
}
2359-
]
2360-
}
2361-
EOF
2362-
2363-
# First extract the source reference
2364-
local extracted_source
2365-
extracted_source=$(extract_sbom_source_reference "$test_sbom" "fallback.json")
2366-
2367-
[ "$extracted_source" = "com.github.ClickHouse/clickhouse-js" ]
2368-
2369-
# Then collect components with that source
2370-
local output_file="$TEST_TEMP_DIR/integration_output.json"
2371-
run collect_components_with_source "$test_sbom" "$extracted_source" "$output_file"
2372-
2373-
[ "$status" -eq 0 ]
2374-
[ -f "$output_file" ]
2375-
2376-
# Verify both components have the extracted source
2377-
local lodash_source=$(jq -r '. | select(.name == "lodash") | .source' "$output_file")
2378-
[ "$lodash_source" = "com.github.ClickHouse/clickhouse-js" ]
2379-
2380-
local express_source=$(jq -r '. | select(.name == "express") | .source' "$output_file")
2381-
[ "$express_source" = "com.github.ClickHouse/clickhouse-js" ]
2382-
}

0 commit comments

Comments
 (0)