From d42e424289369b76809686d31162803b6be04337 Mon Sep 17 00:00:00 2001 From: Cornelius Riemenschneider Date: Mon, 5 Aug 2024 22:05:03 +0200 Subject: [PATCH] Port integration tests to pytest. --- .../all-platforms/diagnostics/syntax-error/test.py | 9 ++------- .../diagnostics/unknown-encoding/diagnostics.expected | 2 +- .../all-platforms/diagnostics/unknown-encoding/test.py | 9 ++------- ruby/ql/integration-tests/all-platforms/qlpack.yml | 4 ---- ruby/ql/integration-tests/legacy | 1 - 5 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 ruby/ql/integration-tests/all-platforms/qlpack.yml delete mode 100644 ruby/ql/integration-tests/legacy diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/test.py b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/test.py index 5f86ca78199..23e0556f57f 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/test.py +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/test.py @@ -1,7 +1,2 @@ -import os -from create_database_utils import * -from diagnostics_test_utils import * - -run_codeql_database_create([], lang="ruby", runFunction = runSuccessfully, db = None) - -check_diagnostics() +def test(codeql, ruby): + codeql.database.create() diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected index eb0264c2e58..1c9caa49824 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected @@ -16,4 +16,4 @@ "visibility": { "statusPage": true } -} \ No newline at end of file +} diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/test.py b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/test.py index 5f86ca78199..23e0556f57f 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/test.py +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/test.py @@ -1,7 +1,2 @@ -import os -from create_database_utils import * -from diagnostics_test_utils import * - -run_codeql_database_create([], lang="ruby", runFunction = runSuccessfully, db = None) - -check_diagnostics() +def test(codeql, ruby): + codeql.database.create() diff --git a/ruby/ql/integration-tests/all-platforms/qlpack.yml b/ruby/ql/integration-tests/all-platforms/qlpack.yml deleted file mode 100644 index 5a103c573d4..00000000000 --- a/ruby/ql/integration-tests/all-platforms/qlpack.yml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: - codeql/ruby-all: '*' - codeql/ruby-queries: '*' -warnOnImplicitThis: true diff --git a/ruby/ql/integration-tests/legacy b/ruby/ql/integration-tests/legacy deleted file mode 100644 index 52478f0a7ef..00000000000 --- a/ruby/ql/integration-tests/legacy +++ /dev/null @@ -1 +0,0 @@ -These tests are still run with the legacy test runner