Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging coverage reports from unit and integration tests. Fixing requirements #663

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ services:
npm run create_instrumented &&
cp -R -n src/* instrumented/ &&
npm run build:test
npm run test:coverage
'

frontend_coverage_generate:
Expand All @@ -193,7 +194,8 @@ services:
bash -xec '
if [[ "3" == `ls -la ./node_modules/ | wc -l` ]]; then npm install; fi && \
mkdir -p .nyc_output &&
cp tests/testflows/coverage/raw/* .nyc_output/
cp tests/testflows/coverage/raw/* .nyc_output/ &&
cp coverage/coverage-final.json .nyc_output/ &&
npx nyc report --reporter=html --report-dir=./tests/testflows/coverage
'

Expand All @@ -212,6 +214,8 @@ services:
bash -xec "
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" &&
GOOS=linux GOARCH=amd64 go build -cover -buildvcs=false -o ./dist/altinity-clickhouse-plugin_linux_amd64 ./pkg/ &&
chmod +x dist/altinity-clickhouse-plugin*
"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development",
"test": "jest",
"test:coverage": "jest --coverage",
"test:ci": "jest --passWithNoTests --maxWorkers 4",
"typecheck": "tsc --noEmit",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
Expand Down
4 changes: 3 additions & 1 deletion tests/testflows/tests/automated/data_source_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,10 @@ def check_default_values_datetime64(self):
RQ_SRS_Plugin_DataSourceSetupView("1.0"),
RQ_SRS_Plugin_DataSourceSetupView_DataSourceName("1.0"),
RQ_SRS_Plugin_DataSourceSetupView_SaveAndTestButton("1.0"),
RQ_SRS_Plugin_Dashboards("1.0"),
RQ_SRS_Plugin_Panels("1.0"),
RQ_SRS_Plugin_DataSourceSetupView_HTTPConnection_ServerAccess("1.0")
RQ_SRS_Plugin_DataSourceSetupView_HTTPConnection_ServerAccess("1.0"),
RQ_SRS_Plugin_DataSourceSetupView_HTTPConnection("1.0"),
)
@Name("data source setup")
def feature(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/testflows/tests/automated/query_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def max_data_points(self):


@TestScenario
@Requirements(RQ_SRS_Plugin_QueryOptions_MinInterval("1.0"))
@Requirements(RQ_SRS_Plugin_QueryOptions_MinInterval("1.0"),
RQ_SRS_Plugin_QueryOptions_Interval("1.0"))
def min_interval(self):
"""Check that grafana plugin supports specifying 'Min interval' textfield."""

Expand Down
10 changes: 8 additions & 2 deletions tests/testflows/tests/automated/sql_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ def extrapolation_toggle(self):


@TestOutline
@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0"))
def skip_comments_toggle(self, query):
"""Check that grafana plugin supports Skip Comments toggle."""

Expand Down Expand Up @@ -369,6 +368,7 @@ def skip_comments_toggle(self, query):


@TestScenario
@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0"))
def multiline_comment(self):
"""Check that grafana plugin supports Skip Comments toggle with multiline comments."""

Expand All @@ -380,6 +380,7 @@ def multiline_comment(self):


@TestScenario
@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0"))
def double_dash_comment(self):
"""Check that grafana plugin supports Skip Comments toggle with multiline comments."""

Expand All @@ -391,6 +392,7 @@ def double_dash_comment(self):


@TestScenario
@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0"))
def hash_comment(self):
"""Check that grafana plugin supports Skip Comments toggle with multiline comments."""

Expand All @@ -402,6 +404,7 @@ def hash_comment(self):


@TestScenario
@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0"))
def hash_exclamation_comment(self):
"""Check that grafana plugin supports Skip Comments toggle with multiline comments."""

Expand All @@ -415,7 +418,10 @@ def hash_exclamation_comment(self):
@TestFeature
@Requirements(
RQ_SRS_Plugin_RawSQLEditorInterface("1.0"),
RQ_SRS_Plugin_RawSQLEditorInterface_ShowGeneratedSQL("1.0")
RQ_SRS_Plugin_RawSQLEditorInterface_ShowGeneratedSQL("1.0"),
RQ_SRS_Plugin_QuerySetup("1.0"),
RQ_SRS_Plugin_QuerySettings("1.0"),
RQ_SRS_Plugin_RawSQLEditorInterface_SQLEditor("1.0")
)
@Name("sql editor")
def feature(self):
Expand Down
Loading