Skip to content

Commit 4ae39ab

Browse files
authored
E2E test: fix integration tests by not running in Docker (#8896)
Stop using docker container for integration tests. The docker approach works for Posit tests but not the Microsoft base tests. The failure is quite confusing so rolling back the use of docker for integration tests.
1 parent 025c548 commit 4ae39ab

File tree

6 files changed

+23
-40
lines changed

6 files changed

+23
-40
lines changed

.github/workflows/test-integration.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ jobs:
2222
integration-tests:
2323
name: integration
2424
runs-on: ubuntu-latest-4x
25-
container:
26-
image: ghcr.io/posit-dev/positron-ubuntu24-amd64:21
27-
options: --user 0:0
28-
credentials:
29-
username: ${{ secrets.POSITRON_GITHUB_USER }}
30-
password: ${{ secrets.POSITRON_GITHUB_PAT }}
3125
timeout-minutes: 40
3226
env:
3327
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -47,18 +41,18 @@ jobs:
4741

4842
- name: Attempt 1 - Setup Build and Compile
4943
id: attempt1
50-
uses: ./.github/actions/setup-build-env
44+
uses: ./.github/actions/setup-unit-test-build-env
5145
continue-on-error: true
5246

5347
- name: Attempt 2 - Setup Build and Compile
5448
if: ${{ steps.attempt1.outcome == 'failure' }}
5549
id: attempt2
56-
uses: ./.github/actions/setup-build-env
50+
uses: ./.github/actions/setup-unit-test-build-env
5751
continue-on-error: true
5852

5953
- name: Attempt 3 - Setup Build and Compile
6054
if: ${{ steps.attempt2.outcome == 'failure' }}
61-
uses: ./.github/actions/setup-build-env
55+
uses: ./.github/actions/setup-unit-test-build-env
6256

6357
- name: Fail if Retries Exhausted
6458
if: ${{ steps.attempt3.outcome == 'failure' }}
@@ -70,8 +64,9 @@ jobs:
7064
github-token: ${{ secrets.POSITRON_GITHUB_PAT }}
7165
license-key: ${{ secrets.POSITRON_DEV_LICENSE }}
7266

73-
- name: Setup XVFB
74-
uses: ./.github/actions/setup-xvfb
67+
# one integration test needs this: Connections pane works for R
68+
- name: Setup R
69+
uses: ./.github/actions/install-r
7570
with:
7671
version: "4.4.0"
7772

build/secrets/.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,10 +1777,10 @@
17771777
"filename": "test/integration/browser/src/index.ts",
17781778
"hashed_secret": "3a8f125da17a2c187d430daf0045e0fdfa707bdd",
17791779
"is_verified": false,
1780-
"line_number": 139,
1780+
"line_number": 135,
17811781
"is_secret": false
17821782
}
17831783
]
17841784
},
1785-
"generated_at": "2025-08-07T17:01:43Z"
1785+
"generated_at": "2025-08-08T13:41:17Z"
17861786
}

scripts/code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function code() {
4848
fi
4949

5050
# Launch Code
51-
exec "$CODE" --no-sandbox . $DISABLE_TEST_EXTENSION "$@"
51+
exec "$CODE" . $DISABLE_TEST_EXTENSION "$@"
5252
}
5353

5454
function code-wsl()

scripts/test-integration.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ fi
5252
echo
5353
echo "### API tests (folder)"
5454
echo
55-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox $ROOT/extensions/vscode-api-tests/testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests $API_TESTS_EXTRA_ARGS
55+
"$INTEGRATION_TEST_ELECTRON_PATH" $ROOT/extensions/vscode-api-tests/testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests $API_TESTS_EXTRA_ARGS
5656
kill_app
5757

5858
echo
5959
echo "### API tests (workspace)"
6060
echo
61-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox $ROOT/extensions/vscode-api-tests/testworkspace.code-workspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/workspace-tests $API_TESTS_EXTRA_ARGS
61+
"$INTEGRATION_TEST_ELECTRON_PATH" $ROOT/extensions/vscode-api-tests/testworkspace.code-workspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/workspace-tests $API_TESTS_EXTRA_ARGS
6262
kill_app
6363

6464
# --- Start Positron ---
@@ -70,8 +70,6 @@ kill_app
7070
# kill_app
7171
# --- End Positron ---
7272

73-
# --- Start Positron ---
74-
# Note that --no-sandox is required in lines below now as these tests run as root in CI.
7573
echo
7674
echo "### Terminal Suggest tests"
7775
echo
@@ -81,7 +79,7 @@ kill_app
8179
echo
8280
echo "### TypeScript tests"
8381
echo
84-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox $ROOT/extensions/typescript-language-features/test-workspace --extensionDevelopmentPath=$ROOT/extensions/typescript-language-features --extensionTestsPath=$ROOT/extensions/typescript-language-features/out/test/unit $API_TESTS_EXTRA_ARGS
82+
"$INTEGRATION_TEST_ELECTRON_PATH" $ROOT/extensions/typescript-language-features/test-workspace --extensionDevelopmentPath=$ROOT/extensions/typescript-language-features --extensionTestsPath=$ROOT/extensions/typescript-language-features/out/test/unit $API_TESTS_EXTRA_ARGS
8583
kill_app
8684

8785
echo
@@ -93,15 +91,14 @@ kill_app
9391
echo
9492
echo "### Emmet tests"
9593
echo
96-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox $ROOT/extensions/emmet/test-workspace --extensionDevelopmentPath=$ROOT/extensions/emmet --extensionTestsPath=$ROOT/extensions/emmet/out/test $API_TESTS_EXTRA_ARGS
94+
"$INTEGRATION_TEST_ELECTRON_PATH" $ROOT/extensions/emmet/test-workspace --extensionDevelopmentPath=$ROOT/extensions/emmet --extensionTestsPath=$ROOT/extensions/emmet/out/test $API_TESTS_EXTRA_ARGS
9795
kill_app
9896

9997
echo
10098
echo "### Git tests"
10199
echo
102-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox $(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$ROOT/extensions/git --extensionTestsPath=$ROOT/extensions/git/out/test $API_TESTS_EXTRA_ARGS
100+
"$INTEGRATION_TEST_ELECTRON_PATH" $(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$ROOT/extensions/git --extensionTestsPath=$ROOT/extensions/git/out/test $API_TESTS_EXTRA_ARGS
103101
kill_app
104-
# --- End Positron ---
105102

106103
echo
107104
echo "### Ipynb tests"

scripts/test-remote-integration.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,59 +73,54 @@ echo "Storing log files into '$VSCODELOGSDIR'."
7373

7474
# Tests in the extension host
7575

76-
# --- Start Positron ---
77-
# --no-sandbox is required for running in docker as root
78-
7976
echo
8077
echo "### API tests (folder)"
8178
echo
82-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$REMOTE_VSCODE/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$REMOTE_VSCODE/vscode-api-tests --extensionTestsPath=$REMOTE_VSCODE/vscode-api-tests/out/singlefolder-tests $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
79+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$REMOTE_VSCODE/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$REMOTE_VSCODE/vscode-api-tests --extensionTestsPath=$REMOTE_VSCODE/vscode-api-tests/out/singlefolder-tests $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
8380
kill_app
8481

8582
echo
8683
echo "### API tests (workspace)"
8784
echo
88-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --file-uri=$REMOTE_VSCODE/vscode-api-tests/testworkspace.code-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/vscode-api-tests --extensionTestsPath=$REMOTE_VSCODE/vscode-api-tests/out/workspace-tests $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
85+
"$INTEGRATION_TEST_ELECTRON_PATH" --file-uri=$REMOTE_VSCODE/vscode-api-tests/testworkspace.code-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/vscode-api-tests --extensionTestsPath=$REMOTE_VSCODE/vscode-api-tests/out/workspace-tests $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
8986
kill_app
9087

9188
echo
9289
echo "### TypeScript tests"
9390
echo
94-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$REMOTE_VSCODE/typescript-language-features/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/typescript-language-features --extensionTestsPath=$REMOTE_VSCODE/typescript-language-features/out/test/unit $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
91+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$REMOTE_VSCODE/typescript-language-features/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/typescript-language-features --extensionTestsPath=$REMOTE_VSCODE/typescript-language-features/out/test/unit $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
9592
kill_app
9693

9794
echo
9895
echo "### Markdown tests"
9996
echo
100-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$REMOTE_VSCODE/markdown-language-features/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/markdown-language-features --extensionTestsPath=$REMOTE_VSCODE/markdown-language-features/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
97+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$REMOTE_VSCODE/markdown-language-features/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/markdown-language-features --extensionTestsPath=$REMOTE_VSCODE/markdown-language-features/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
10198
kill_app
10299

103100
echo
104101
echo "### Emmet tests"
105102
echo
106-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$REMOTE_VSCODE/emmet/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/emmet --extensionTestsPath=$REMOTE_VSCODE/emmet/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
103+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$REMOTE_VSCODE/emmet/test-workspace --extensionDevelopmentPath=$REMOTE_VSCODE/emmet --extensionTestsPath=$REMOTE_VSCODE/emmet/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
107104
kill_app
108105

109106
echo
110107
echo "### Git tests"
111108
echo
112-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/git --extensionTestsPath=$REMOTE_VSCODE/git/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
109+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/git --extensionTestsPath=$REMOTE_VSCODE/git/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
113110
kill_app
114111

115112
echo
116113
echo "### Ipynb tests"
117114
echo
118-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/ipynb --extensionTestsPath=$REMOTE_VSCODE/ipynb/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
115+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/ipynb --extensionTestsPath=$REMOTE_VSCODE/ipynb/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
119116
kill_app
120117

121118
echo
122119
echo "### Configuration editing tests"
123120
echo
124-
"$INTEGRATION_TEST_ELECTRON_PATH" --no-sandbox --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/configuration-editing --extensionTestsPath=$REMOTE_VSCODE/configuration-editing/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
121+
"$INTEGRATION_TEST_ELECTRON_PATH" --folder-uri=$AUTHORITY$(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$REMOTE_VSCODE/configuration-editing --extensionTestsPath=$REMOTE_VSCODE/configuration-editing/out/test $API_TESTS_EXTRA_ARGS $EXTRA_INTEGRATION_TEST_ARGUMENTS
125122
kill_app
126123

127-
# --- End Positron ---
128-
129124
# Cleanup
130125

131126
if [[ "$3" == "" ]]; then

test/integration/browser/src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ type BrowserType = 'chromium' | 'firefox' | 'webkit';
6464
type BrowserChannel = 'msedge' | 'chrome';
6565

6666
async function runTestsInBrowser(browserType: BrowserType, browserChannel: BrowserChannel, endpoint: url.UrlWithStringQuery, server: cp.ChildProcess): Promise<void> {
67-
const browser = await playwright[browserType].launch({
68-
headless: !Boolean(args.debug),
69-
channel: browserChannel,
70-
args: ['--no-sandbox']
71-
});
67+
const browser = await playwright[browserType].launch({ headless: !Boolean(args.debug), channel: browserChannel });
7268
const context = await browser.newContext();
7369

7470
const page = await context.newPage();

0 commit comments

Comments
 (0)