-
Notifications
You must be signed in to change notification settings - Fork 727
Add integration test for restore of file-based programs #8470
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
Changes from 36 commits
bd19287
1305e21
e0dea11
3458d52
d4b5997
f9be157
5fd1d9c
45e4d45
fa315bc
02e435c
0ef2931
5a32bb2
ad92e62
2239641
e4e236a
2fd2774
3beee8e
3054919
94a2175
386f63e
f31eeaa
4fb723a
b9637ba
2493d9d
eb24923
3c5d899
77781dc
cc3d74f
9d742a3
7cf3de2
78c2213
3e60d31
c2f35aa
dd46cce
b78119a
0baa5ab
885011d
a56489b
c030821
b9eb6a9
3925c0c
293cf59
c7ceaf1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,62 @@ | ||||
| /*--------------------------------------------------------------------------------------------- | ||||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||||
| *--------------------------------------------------------------------------------------------*/ | ||||
|
|
||||
| import * as vscode from 'vscode'; | ||||
| import * as path from 'path'; | ||||
| import testAssetWorkspace from './testAssets/testAssetWorkspace'; | ||||
| import { | ||||
| activateCSharpExtension, | ||||
| closeAllEditorsAsync, | ||||
| getCompletionsAsync, | ||||
| openFileInWorkspaceAsync, | ||||
| revertActiveFile, | ||||
| sleep, | ||||
| waitForAllAsyncOperationsAsync, | ||||
| waitForExpectedResult, | ||||
| } from './integrationHelpers'; | ||||
| import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; | ||||
| import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; | ||||
|
|
||||
| const doRunSuite = process.env['ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS'] !== 'true'; | ||||
| console.log(`process.env.ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS: ${process.env.ROSLYN_SKIP_TEST_FILE_BASED_PROGRAMS}`); | ||||
| console.log(`doRunSuite: ${doRunSuite}`); | ||||
|
||||
| export const describeIfCSharp = describeIf(!usingDevKit()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking it would be reasonable to set this for all Roslyn integration test runs, even if we don't use it yet.
e.g.
| process.env.RUNNING_INTEGRATION_TESTS = 'true'; |
I can look at that in a followup though myself.
RikkiGibson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- Integration tests need to cleanup artifacts between runs. Putting the artifacts under 'testAssets' will ensure this happens when assets are overwritten after test run. --> | ||
| <ArtifactsPath>$(MSBuildThisFileDirectory)</ArtifactsPath> | ||
| </PropertyGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| using Newton; | ||
|
||
|
|
||
| Console.WriteLine("Hello World!"); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import * as lsp from 'vscode-languageserver-protocol'; | ||
|
|
||
| export interface WaitForAsyncOperationsParams { | ||
| /** | ||
| * The operations to wait for. | ||
| */ | ||
| operations: string[]; | ||
| } | ||
|
|
||
| export interface WaitForAsyncOperationsResponse {} // eslint-disable-line @typescript-eslint/no-empty-object-type | ||
|
|
||
| export namespace WaitForAsyncOperationsRequest { | ||
| export const method = 'workspace/waitForAsyncOperations'; | ||
| export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; | ||
| export const type = new lsp.RequestType<WaitForAsyncOperationsParams, WaitForAsyncOperationsResponse, void>(method); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#environment-variables
Linux env vars are case sensitive, so, the
env.lookup is case sensitive. Since we were not using an uppercase name to access the env var, we weren't seeing it in the test.Figuring this out took an unreasonable amount of time.