Skip to content

Commit

Permalink
Merge branch 'issue-330' into issue-330-e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
antip00 committed Nov 22, 2024
2 parents a527b2e + 6ed91d5 commit 2fc1337
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ services:
if [[ "3" == `ls -la ./node_modules/ | wc -l` ]]; then npm install; fi && \
mkdir -p .nyc_output &&
cp tests/testflows/coverage/raw/* .nyc_output/ &&
npx nyc report --reporter=html --report-dir=./tests/testflows/frontend_coverage_testflows
cp coverage/coverage-final.json .nyc_output/ &&
npx nyc report --reporter=html --report-dir=./tests/testflows/coverage
'
Expand All @@ -216,7 +217,7 @@ services:
git config --global --add safe.directory /go/src/grafana-clickhouse &&
(command -v mage || go install -v github.com/magefile/mage@latest) &&
mkdir -p /go/src/grafana-clickhouse/coverage/raw &&
go test -timeout 1m -cover -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ -test.gocoverdir="/go/src/grafana-clickhouse/coverage/raw" &&
go test -timeout 1m -cover -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ -test.gocoverdir="/go/src/grafana-clickhouse/coverage" &&
GOOS=linux GOARCH=amd64 go build -cover -buildvcs=false -o ./dist/altinity-clickhouse-plugin_linux_amd64 ./pkg/ &&
chmod +x dist/altinity-clickhouse-plugin*
"
Expand All @@ -228,6 +229,11 @@ services:
- ./:/go/src/grafana-clickhouse
command: |
bash -xec "
go tool covdata textfmt -i=coverage/raw -o=coverage/coverage.txt &&
go tool cover -html=coverage/coverage.txt -o=coverage/coverage.html &&
mkdir -p ./tests/testflows/backend_coverage_testflows/
mv coverage/coverage.html ./tests/testflows/backend_coverage_testflows/ &&
mv coverage/covcounters* coverage/raw/ &&
go tool covdata textfmt -i=coverage/raw -o=coverage/coverage.txt &&
go tool cover -html=coverage/coverage.txt -o=coverage/coverage.html
"
Expand Down
2 changes: 1 addition & 1 deletion src/views/QueryEditor/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function QueryEditor(props: QueryEditorProps<CHDataSource, CHQuery, CHDat
const onTriggerQuery = () => onRunQuery();

// @ts-ignore
const adHocFilters = getAdhocFilters(datasource.name, query.datasource.uid)
const adHocFilters = getAdhocFilters(datasource?.name, query.datasource?.uid)
const areAdHocFiltersAvailable = !!adHocFilters.length;
useEffect(() => {
if (props.app !== 'explore') {
Expand Down
5 changes: 4 additions & 1 deletion tests/testflows/infra/create-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ tfs --debug --no-colors report coverage - ./testflows_logs/raw.log - --confiden
mkdir code_coverage
mkdir code_coverage/backend
mkdir code_coverage/frontend
mkdir ./testflows_logs/frontend
cp -rfv coverage/* code_coverage/backend
cp -rfv tests/testflows/coverage/* code_coverage/frontend
cp -rfv tests/testflows/coverage/* code_coverage/frontend
cp -rfv tests/testflows/frontend_coverage_testflows/* ./testflows_logs/frontend
cp -rfv tests/testflows/backend_coverage_testflows/* ./testflows_logs/backend

0 comments on commit 2fc1337

Please sign in to comment.