google_api_firebase_rules v0.2.0 GoogleApi.FirebaseRules.V1.Model.TestResult View Source

Test result message containing the state of the test as well as a description and source position for test failures.

Attributes

  • debugMessages ([String.t]): Debug messages related to test execution issues encountered during evaluation. Debug messages may be related to too many or too few invocations of function mocks or to runtime errors that occur during evaluation. For example: ```Unable to read variable [name: "resource"]``` Defaults to: null.
  • errorPosition (SourcePosition): Position in the `Source` or `Ruleset` where the principle runtime error occurs. Evaluation of an expression may result in an error. Rules are deny by default, so a `DENY` expectation when an error is generated is valid. When there is a `DENY` with an error, the `SourcePosition` is returned. E.g. `error_position { line: 19 column: 37 }` Defaults to: null.
  • functionCalls ([FunctionCall]): The set of function calls made to service-defined methods. Function calls are included in the order in which they are encountered during evaluation, are provided for both mocked and unmocked functions, and included on the response regardless of the test `state`. Defaults to: null.
  • state (String.t): State of the test. Defaults to: null.

    • Enum - one of [STATE_UNSPECIFIED, SUCCESS, FAILURE]
  • visitedExpressions ([VisitedExpression]): The set of visited expressions for a given test. This returns positions and evaluation results of all visited expressions. Defaults to: null.

Link to this section Summary

Functions

Unwrap a decoded JSON object into its complex fields

Link to this section Types

Link to this type t() View Source
t() :: %GoogleApi.FirebaseRules.V1.Model.TestResult{
  debugMessages: [any()],
  errorPosition: GoogleApi.FirebaseRules.V1.Model.SourcePosition.t(),
  functionCalls: [GoogleApi.FirebaseRules.V1.Model.FunctionCall.t()],
  state: any(),
  visitedExpressions: [GoogleApi.FirebaseRules.V1.Model.VisitedExpression.t()]
}

Link to this section Functions

Link to this function decode(value, options) View Source
decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.