From a5dcec7a8b5a42a4e4481f503dcabe262ad2534b Mon Sep 17 00:00:00 2001 From: Pawel Pasterz Date: Sun, 16 Aug 2020 21:39:53 +0200 Subject: [PATCH] Update tests and linting --- test_runner/src/main/kotlin/ftl/Main.kt | 6 +++++- .../src/main/kotlin/ftl/cli/firebase/TestCommand.kt | 6 +++++- .../cli/firebase/test/ipblocks/IPBlocksListCommand.kt | 3 +-- test_runner/src/main/kotlin/ftl/gc/GcTesting.kt | 1 - .../ftl/cli/firebase/test/IPBlocksCommandTest.kt | 1 + .../cli/firebase/test/NetworkProfilesCommandTest.kt | 11 ++++++----- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/Main.kt b/test_runner/src/main/kotlin/ftl/Main.kt index 6df259b869..dfa191bea1 100644 --- a/test_runner/src/main/kotlin/ftl/Main.kt +++ b/test_runner/src/main/kotlin/ftl/Main.kt @@ -4,7 +4,11 @@ import ftl.cli.AuthCommand import ftl.cli.FirebaseCommand import ftl.cli.firebase.CancelCommand import ftl.cli.firebase.RefreshCommand -import ftl.cli.firebase.test.* +import ftl.cli.firebase.test.AndroidCommand +import ftl.cli.firebase.test.IPBlocksCommand +import ftl.cli.firebase.test.IosCommand +import ftl.cli.firebase.test.NetworkProfilesCommand +import ftl.cli.firebase.test.ProvidedSoftwareCommand import ftl.log.setDebugLogging import ftl.util.readRevision import ftl.util.readVersion diff --git a/test_runner/src/main/kotlin/ftl/cli/firebase/TestCommand.kt b/test_runner/src/main/kotlin/ftl/cli/firebase/TestCommand.kt index 72a226e3bc..a22405277c 100644 --- a/test_runner/src/main/kotlin/ftl/cli/firebase/TestCommand.kt +++ b/test_runner/src/main/kotlin/ftl/cli/firebase/TestCommand.kt @@ -1,6 +1,10 @@ package ftl.cli.firebase -import ftl.cli.firebase.test.* +import ftl.cli.firebase.test.AndroidCommand +import ftl.cli.firebase.test.IPBlocksCommand +import ftl.cli.firebase.test.IosCommand +import ftl.cli.firebase.test.NetworkProfilesCommand +import ftl.cli.firebase.test.ProvidedSoftwareCommand import picocli.CommandLine import picocli.CommandLine.Command diff --git a/test_runner/src/main/kotlin/ftl/cli/firebase/test/ipblocks/IPBlocksListCommand.kt b/test_runner/src/main/kotlin/ftl/cli/firebase/test/ipblocks/IPBlocksListCommand.kt index f33115e9da..7e303ff3e8 100644 --- a/test_runner/src/main/kotlin/ftl/cli/firebase/test/ipblocks/IPBlocksListCommand.kt +++ b/test_runner/src/main/kotlin/ftl/cli/firebase/test/ipblocks/IPBlocksListCommand.kt @@ -1,7 +1,6 @@ package ftl.cli.firebase.test.ipblocks import ftl.environment.ipBlocksListAsTable -import ftl.gc.GcTesting import picocli.CommandLine @CommandLine.Command( @@ -19,4 +18,4 @@ class IPBlocksListCommand : Runnable { override fun run() { println(ipBlocksListAsTable()) } -} \ No newline at end of file +} diff --git a/test_runner/src/main/kotlin/ftl/gc/GcTesting.kt b/test_runner/src/main/kotlin/ftl/gc/GcTesting.kt index 64c1abf352..c36f2fb098 100644 --- a/test_runner/src/main/kotlin/ftl/gc/GcTesting.kt +++ b/test_runner/src/main/kotlin/ftl/gc/GcTesting.kt @@ -1,7 +1,6 @@ package ftl.gc import com.google.api.services.testing.Testing -import com.google.api.services.testing.model.DeviceIpBlock import ftl.config.FtlConstants import ftl.config.FtlConstants.JSON_FACTORY import ftl.config.FtlConstants.applicationName diff --git a/test_runner/src/test/kotlin/ftl/cli/firebase/test/IPBlocksCommandTest.kt b/test_runner/src/test/kotlin/ftl/cli/firebase/test/IPBlocksCommandTest.kt index ba4dc64923..c99c3e437b 100644 --- a/test_runner/src/test/kotlin/ftl/cli/firebase/test/IPBlocksCommandTest.kt +++ b/test_runner/src/test/kotlin/ftl/cli/firebase/test/IPBlocksCommandTest.kt @@ -15,6 +15,7 @@ class IPBlocksCommandTest { IPBlocksCommand().run() val expected = """ +Explore IP blocks used by Firebase Test Lab devices. ip-blocks [COMMAND] Commands: list List all IP address blocks used by Firebase Test Lab devices diff --git a/test_runner/src/test/kotlin/ftl/cli/firebase/test/NetworkProfilesCommandTest.kt b/test_runner/src/test/kotlin/ftl/cli/firebase/test/NetworkProfilesCommandTest.kt index 1a9b20272b..d6ab57c178 100644 --- a/test_runner/src/test/kotlin/ftl/cli/firebase/test/NetworkProfilesCommandTest.kt +++ b/test_runner/src/test/kotlin/ftl/cli/firebase/test/NetworkProfilesCommandTest.kt @@ -17,11 +17,12 @@ class NetworkProfilesCommandTest { NetworkProfilesCommand().run() val expected = listOf( - "network-profiles [COMMAND]", - "Commands:", - " list List all network profiles available for testing", - " describe Describe a network profile", - "" + "Explore network profiles available for testing.", + "network-profiles [COMMAND]", + "Commands:", + " list List all network profiles available for testing", + " describe Describe a network profile", + "" ).joinToString("\n") val actual = systemOutRule.log.normalizeLineEnding()