-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 allow specific service name per file with git (#183)
allow specific service name per file with git
- Loading branch information
1 parent
8b2410e
commit 37c2fa1
Showing
7 changed files
with
97 additions
and
26 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
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
22 changes: 22 additions & 0 deletions
22
providers/git/src/test/scala/restui/providers/git/git/data/RestUISpec.scala
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,22 @@ | ||
package restui.providers.git.git.data | ||
|
||
import cats.syntax.either._ | ||
import io.circe.yaml.parser | ||
import org.scalatest.flatspec.AnyFlatSpec | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class RestUISpec extends AnyFlatSpec with Matchers { | ||
it should "decode a restui config file" in { | ||
val input = """name: "test" | ||
|specifications: | ||
| - "file.yaml" | ||
| - name: "another service" | ||
| path: "other.yaml" | ||
""".stripMargin | ||
val restui = parser | ||
.parse(input) | ||
.flatMap(_.as[RestUI]) | ||
.valueOr(throw _) | ||
restui shouldBe RestUI(Some("test"), UnnamedSpecification("file.yaml") :: NamedSpecification("another service", "other.yaml") :: Nil) | ||
} | ||
} |