-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from guardrail-dev/1.x
Initial milestone release
- Loading branch information
Showing
9 changed files
with
75 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ '8', '11', '17' ] | ||
java: [ '1.14', '1.17' ] | ||
scala: [ '2.12.18' ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
- uses: olafurpg/setup-scala@v14 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java }} | ||
java-version: zulu@${{ matrix.java }} | ||
- name: print Java version | ||
run: java -version | ||
- name: Coursier cache | ||
|
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
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
24 changes: 14 additions & 10 deletions
24
src/test/scala/dev/guardrail/sbt/ContextParameterSpec.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 |
---|---|---|
@@ -1,21 +1,25 @@ | ||
package dev.guardrail.sbt | ||
|
||
import dev.guardrail.Context | ||
import dev.guardrail.{ AuthImplementation, Context, TagsBehaviour } | ||
|
||
import org.scalatest.funsuite.AnyFunSuite | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class EscapeTreeSpec extends AnyFunSuite with Matchers { | ||
|
||
test("Ensure that all Context fields are accounted for") { | ||
val Context( | ||
framework, | ||
customExtraction, | ||
tracing, | ||
modules, | ||
propertyRequirement, | ||
tagsBehaviour, | ||
authImplementation | ||
) = Context.empty | ||
val built = Context( | ||
None, | ||
customExtraction = false, | ||
tracing = false, | ||
modules = List.empty, | ||
propertyRequirement = dev.guardrail.terms.protocol.PropertyRequirement.Configured( | ||
dev.guardrail.terms.protocol.PropertyRequirement.OptionalLegacy, | ||
dev.guardrail.terms.protocol.PropertyRequirement.OptionalLegacy | ||
), | ||
tagsBehaviour = TagsBehaviour.TagsAreIgnored, | ||
authImplementation = AuthImplementation.Disable | ||
) | ||
built.toString() shouldBe (Context.empty.toString()) | ||
} | ||
} |