Skip to content

Commit

Permalink
tests: add spread suite for copy plugin
Browse files Browse the repository at this point in the history
Move the integration tests for the copy plugin into a spread suite.

LP: #1783831

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
  • Loading branch information
kyrofa committed Aug 8, 2018
1 parent f62504d commit 3f11b44
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 63 deletions.
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" ]

0 comments on commit 3f11b44

Please sign in to comment.