Skip to content
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

tests: add spread suite for copy plugin #2199

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ restore: $SETUP_DIR/restore.sh
suites:
tests/spread/plugins/autotools/:
summary: tests of snapcraft's Autotools plugin
tests/spread/plugins/copy/:
summary: tests of snapcraft's Copy plugin
tests/spread/plugins/cmake/:
summary: tests of snapcraft's CMake plugin
tests/spread/plugins/go/:
Expand Down
43 changes: 0 additions & 43 deletions tests/integration/plugins/test_copy_plugin.py

This file was deleted.

Binary file not shown.
15 changes: 0 additions & 15 deletions tests/integration/snaps/copy-with-source/snapcraft.yaml

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/integration/snaps/copy-with-source/src/subdir/file

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: copy-with-file-and-dir
version: 0.1
name: copy-plugin-test
version: '1.0'
summary: test the copy plugin
description: |
This is a basic copy snap. It just copies a file and a directory.
If you want to add other functionalities to this snap, please don't.
Make a new one.
icon: icon.png

grade: devel
confinement: strict

parts:
Expand Down
16 changes: 16 additions & 0 deletions tests/spread/plugins/copy/stage-test/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
summary: Stage a copy pluginpart

environment:
SNAP_DIR: ../snaps/copy-plugin-test
restore: |
cd "$SNAP_DIR"
snapcraft clean
rm -f ./*.snap

execute: |
cd "$SNAP_DIR"
snapcraft stage

# Verify that the copy plugin arranged things correctly
[ "$(cat stage/dst)" = "I got copied" ]
[ "$(cat stage/dstdir/srcdirfile.txt)" = "A file in the source directory" ]