Skip to content

Commit

Permalink
fix deprecation warning for ANSIBLE_COLLECTIONS_PATH (#1577)
Browse files Browse the repository at this point in the history
* fix deprecation warning for ANSIBLE_COLLECTIONS_PATH

* check logs for e2e test failure

* Remove ending newline char for syntax error message check

* Revert "check logs for e2e test failure"

This reverts commit bf73a28.
  • Loading branch information
audgirka authored Oct 9, 2024
1 parent 7d854a7 commit 60d792b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/ansible-language-server/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export function deleteAlsCache(): void {

export function setFixtureAnsibleCollectionPathEnv(prePendPath?: string): void {
if (prePendPath) {
process.env.ANSIBLE_COLLECTIONS_PATHS = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
process.env.ANSIBLE_COLLECTIONS_PATH = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
} else {
process.env.ANSIBLE_COLLECTIONS_PATHS =
process.env.ANSIBLE_COLLECTIONS_PATH =
ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH;
}
}

export function unSetFixtureAnsibleCollectionPathEnv(): void {
process.env.ANSIBLE_COLLECTIONS_PATHS = undefined;
process.env.ANSIBLE_COLLECTIONS_PATH = undefined;
}

export function setAnsibleConfigEnv(): void {
Expand Down
6 changes: 3 additions & 3 deletions test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ export function setFixtureAnsibleCollectionPathEnv(
prePendPath: string | undefined = undefined,
): void {
if (prePendPath) {
process.env.ANSIBLE_COLLECTIONS_PATHS = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
process.env.ANSIBLE_COLLECTIONS_PATH = `${prePendPath}:${ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH}`;
} else {
process.env.ANSIBLE_COLLECTIONS_PATHS =
process.env.ANSIBLE_COLLECTIONS_PATH =
ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH;
}
}

export function unSetFixtureAnsibleCollectionPathEnv(): void {
process.env.ANSIBLE_COLLECTIONS_PATHS = undefined;
process.env.ANSIBLE_COLLECTIONS_PATH = undefined;
}

export async function enableExecutionEnvironmentSettings(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion test/testScripts/diagnostics/testYamlWithoutEE.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function testDiagnosticsYAMLWithoutEE(): void {
severity: 0,
message:
"Syntax Error while loading YAML.\n" +
" mapping values are not allowed in this context\n",
" mapping values are not allowed in this context",
range: new vscode.Range(
new vscode.Position(6, 21),
new vscode.Position(6, integer.MAX_VALUE),
Expand Down

0 comments on commit 60d792b

Please sign in to comment.