-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fix/failed-download-d…
…etection
- Loading branch information
Showing
15 changed files
with
148 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Apache License, Version 2.0 which is available at | ||
// https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
// License for the specific language governing permissions and limitations | ||
// under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { expect } from 'chai'; | ||
import 'mocha'; | ||
import { ComponentConfig, ComponentContext, ComponentManifest } from '../../src/modules/component'; | ||
import { PackageConfig, getPackageFolderPath } from '../../src/modules/package'; | ||
import { join } from 'path'; | ||
|
||
function createDefaultComponentContext(basePath?: string): ComponentContext { | ||
const componentId = "componentUnderTest"; | ||
const pkgConfig = new PackageConfig({ repo: "packageUnderTest", version: "main" }); | ||
const componentManifest: ComponentManifest = { | ||
id: componentId, | ||
basePath: basePath | ||
}; | ||
const componentConfig = new ComponentConfig(componentId); | ||
return new ComponentContext(pkgConfig, componentManifest, componentConfig, true); | ||
} | ||
|
||
describe('component - module', () => { | ||
describe('ComponentContext`s getComponentPath function', () => { | ||
it('should return the package path as the component path, if no base path is given', () => { | ||
const componentContext = createDefaultComponentContext(); | ||
expect(componentContext.getComponentPath()).to.equal(join(getPackageFolderPath(), "packageUnderTest", "main")); | ||
}); | ||
|
||
it('should return the package path extended by the basePath as the component path, if a base path is given', () => { | ||
const componentContext = createDefaultComponentContext("foo/bar"); | ||
expect(componentContext.getComponentPath()).to.equal(join(getPackageFolderPath(), "packageUnderTest", "main", "foo", "bar")); | ||
}); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
testbench/test-exec/packages/test-package/test-version/components/test-component2/nested.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
print("hello nested") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
"components": [ | ||
{ | ||
"id": "test-componentOne", | ||
"type": "setup", | ||
"files": [ | ||
{ | ||
"src": "testFile.sh", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
testbench/test-sync/packages/test-packageTwo/test-version/nested/dummy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A nested file |