From 324416ca064e365d2a9ae4d7ed620aa6decf4ebf Mon Sep 17 00:00:00 2001 From: Vladimir Petko Date: Tue, 8 Oct 2024 10:12:54 +1300 Subject: [PATCH] test: add smoke test for push --- .../rockcraft/gradle/RockcraftPluginTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java index 5abf82d..4af8af0 100644 --- a/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java +++ b/rockcraft-gradle/src/test/java/com/canonical/rockcraft/gradle/RockcraftPluginTest.java @@ -36,6 +36,17 @@ void buildRockTest() throws IOException { assertEquals(TaskOutcome.SUCCESS, getLastTaskOutcome(result)); // the build needs to succeed } + /** + * Make a separate test for pushing, so that it could be excluded in docker-less + * scenarios + * @throws IOException + */ + @Test + void pushRockTest() throws IOException { + BuildResult result = runBuild("push-rock"); + assertEquals(TaskOutcome.SUCCESS, getLastTaskOutcome(result)); // the build needs to succeed + } + @Test void validRockcraftYaml() throws IOException { runBuild("create-rock");