-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for handling special characters in module version
Signed-off-by: Krzysztof Piotrowski <[email protected]>
- Loading branch information
Showing
12 changed files
with
64 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
nfpm package -f "$SCRIPT_DIR/nfpm-version1.yaml" --target "$SCRIPT_DIR/" --packager deb | ||
nfpm package -f "$SCRIPT_DIR/nfpm-version2.yaml" --target "$SCRIPT_DIR/" --packager deb | ||
pushd "$SCRIPT_DIR" 2>/dev/null ||: | ||
nfpm package -f "nfpm-version1.yaml" --target "./" --packager deb | ||
nfpm package -f "nfpm-version2.yaml" --target "./" --packager deb | ||
nfpm package -f "nfpm-package-with-epoch.yaml" --target "./" --packager deb | ||
popd 2>/dev/null ||: |
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
21 changes: 21 additions & 0 deletions
21
tests/RobotFramework/tests/plugin_apt/install_package_with_epoch.robot
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,21 @@ | ||
*** Settings *** | ||
Resource ../../resources/common.resource | ||
Library ThinEdgeIO | ||
Library Cumulocity | ||
|
||
Test Setup Custom Setup | ||
Test Teardown Get Logs | ||
|
||
Test Tags theme:software theme:plugins | ||
|
||
*** Test Cases *** | ||
Install package with Epoch in version #2666 | ||
${FILE_URL}= Cumulocity.Create Inventory Binary package-with-epoch package file=${CURDIR}/package-with-epoch_1.2.3_all.deb | ||
${OPERATION}= Install Software {"name": "package-with-epoch", "version": "2:1.2.3", "softwareType": "apt", "url": "${FILE_URL}"} | ||
${OPERATION}= Operation Should Be SUCCESSFUL ${OPERATION} timeout=60 | ||
Device Should Have Installed Software {"name": "package-with-epoch", "version": "2:1.2.3", "softwareType": "apt"} | ||
|
||
*** Keywords *** | ||
Custom Setup | ||
${DEVICE_SN}= Setup | ||
Device Should Exist ${DEVICE_SN} |
19 changes: 19 additions & 0 deletions
19
tests/RobotFramework/tests/plugin_apt/nfpm-package-with-epoch.yaml
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,19 @@ | ||
# yaml-language-server: $schema=https://nfpm.goreleaser.com/static/schema.json | ||
--- | ||
name: package-with-epoch | ||
arch: all | ||
platform: linux | ||
version: 1.2.3 | ||
section: default | ||
priority: optional | ||
maintainer: thin-edge.io <[email protected]> | ||
description: Example package which uses the epoch field | ||
homepage: https://thin-edge.io/ | ||
license: MIT | ||
epoch: "2" | ||
|
||
contents: | ||
# reuse an existing file for convenience | ||
- src: ./sampledeb_1.cfg | ||
dst: /etc/package-with-epoch/ | ||
type: config |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ platform: linux | |
version: 1.0.0 | ||
section: default | ||
priority: optional | ||
maintainer: Your Name <[email protected]> | ||
maintainer: thin-edge.io <[email protected]> | ||
description: My Sample App Debian Package | ||
homepage: https://example.com/myapp | ||
license: MIT | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ platform: linux | |
version: 2.0.0 | ||
section: default | ||
priority: optional | ||
maintainer: Your Name <[email protected]> | ||
maintainer: thin-edge.io <[email protected]> | ||
description: My Sample App Debian Package | ||
homepage: https://example.com/myapp | ||
license: MIT | ||
|
Binary file added
BIN
+762 Bytes
tests/RobotFramework/tests/plugin_apt/package-with-epoch_1.2.3_all.deb
Binary file not shown.
Binary file modified
BIN
-8 Bytes
(99%)
tests/RobotFramework/tests/plugin_apt/sampledeb_1.0.0_all.deb
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(99%)
tests/RobotFramework/tests/plugin_apt/sampledeb_2.0.0_all.deb
Binary file not shown.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
[apt] | ||
name = "(tedge|c8y|python|wget|vim|curl|apt|mosquitto|ssh|sudo|rolldice).*" | ||
maintainer = ".*(thin-edge.io).*" |