Skip to content

Commit aec06c8

Browse files
committed
Port go tests.
1 parent f891423 commit aec06c8

File tree

51 files changed

+96
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+96
-135
lines changed

go/ql/integration-tests/all-platforms/go/bazel-sample-1/force_sequential_test_execution

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
from go_integration_test import *
2-
3-
go_integration_test()
1+
def test(codeql, go):
2+
codeql.database.create(source_root="src")

go/ql/integration-tests/all-platforms/go/bazel-sample-2/force_sequential_test_execution

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
from go_integration_test import *
2-
3-
go_integration_test()
1+
def test(codeql, go):
2+
codeql.database.create(source_root="src")
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
2+
import pytest
23

3-
from go_integration_test import *
44

5-
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
6-
go_integration_test(source="work", db=None)
5+
@pytest.mark.resolve_build_environment(source_root="work")
6+
def test(codeql, go):
7+
os.environ["LGTM_INDEX_IMPORT_PATH"] = "test"
8+
codeql.database.create(source_root="work")

go/ql/integration-tests/all-platforms/go/diagnostics/force_sequential_test_execution

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
2+
import pytest
23

3-
from go_integration_test import *
44

5-
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
6-
go_integration_test(source="work")
5+
@pytest.mark.resolve_build_environment(source_root="work")
6+
def test(codeql, go):
7+
os.environ["LGTM_INDEX_IMPORT_PATH"] = "test"
8+
codeql.database.create(source_root="work")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from go_integration_test import *
43

5-
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
6-
go_integration_test()
4+
def test(codeql, go):
5+
os.environ["LGTM_INDEX_IMPORT_PATH"] = "test"
6+
codeql.database.create(source_root="src")
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
2+
import pytest
23

3-
from go_integration_test import *
44

5-
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
6-
go_integration_test(source="work", db=None, runFunction=runUnsuccessfully)
5+
@pytest.mark.resolve_build_environment(source_root="work")
6+
def test(codeql, go):
7+
os.environ["LGTM_INDEX_IMPORT_PATH"] = "test"
8+
codeql.database.create(source_root="work", _assert_failure=True)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
2+
import pytest
23

3-
from go_integration_test import *
44

5-
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
6-
go_integration_test(source="work", db=None, runFunction=runUnsuccessfully)
5+
@pytest.mark.resolve_build_environment(source_root="work")
6+
def test(codeql, go):
7+
os.environ["LGTM_INDEX_IMPORT_PATH"] = "test"
8+
codeql.database.create(source_root="work", _assert_failure=True)

0 commit comments

Comments
 (0)