From da602dfb35a47c62292629e5e230d6c1dc27878b Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Thu, 16 Apr 2026 14:06:33 -0700 Subject: [PATCH] update expected error message --- internal/celtransformer/celformer_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/celtransformer/celformer_test.go b/internal/celtransformer/celformer_test.go index 3ee786f54..d9ea59961 100644 --- a/internal/celtransformer/celformer_test.go +++ b/internal/celtransformer/celformer_test.go @@ -1,4 +1,4 @@ -// Copyright 2023-2024 the Pinniped contributors. All Rights Reserved. +// Copyright 2023-2026 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package celtransformer @@ -596,7 +596,7 @@ func TestTransformer(t *testing.T) { &UsernameTransformation{Expression: `groups.filter(x, groups.all(x, true))[0]`}, }, ctx: alreadyCancelledContext, - wantEvaluationErr: `identity transformation at index 0: operation interrupted`, + wantEvaluationErr: `identity transformation at index 0: context canceled`, }, { name: "slow groups transformation expressions are canceled by the cancel context after partial evaluation", @@ -606,7 +606,7 @@ func TestTransformer(t *testing.T) { &GroupsTransformation{Expression: `groups.filter(x, groups.all(x, true))`}, }, ctx: alreadyCancelledContext, - wantEvaluationErr: `identity transformation at index 0: operation interrupted`, + wantEvaluationErr: `identity transformation at index 0: context canceled`, }, { name: "slow policy expressions are canceled by the cancel context after partial evaluation", @@ -617,7 +617,7 @@ func TestTransformer(t *testing.T) { &AllowAuthenticationPolicy{Expression: `groups.all(x, groups.all(x, true))`}, // this is the slow one }, ctx: alreadyCancelledContext, - wantEvaluationErr: `identity transformation at index 1: operation interrupted`, + wantEvaluationErr: `identity transformation at index 1: context canceled`, }, { name: "slow transformation expressions are canceled and the rest of the expressions do not run", @@ -630,7 +630,7 @@ func TestTransformer(t *testing.T) { &UsernameTransformation{Expression: `groups.filter(x, groups.all(x, true))[0]`}, }, ctx: alreadyCancelledContext, - wantEvaluationErr: `identity transformation at index 1: operation interrupted`, + wantEvaluationErr: `identity transformation at index 1: context canceled`, }, { name: "slow username transformation expressions are canceled after a maximum allowed duration", @@ -640,7 +640,7 @@ func TestTransformer(t *testing.T) { // On my laptop, evaluating this expression would take ~20 seconds if we allowed it to evaluate to completion. &UsernameTransformation{Expression: `groups.filter(x, groups.all(x, true))[0]`}, }, - wantEvaluationErr: `identity transformation at index 0: operation interrupted`, + wantEvaluationErr: `identity transformation at index 0: context deadline exceeded`, }, { name: "slow groups transformation expressions are canceled after a maximum allowed duration", @@ -650,7 +650,7 @@ func TestTransformer(t *testing.T) { // On my laptop, evaluating this expression would take ~20 seconds if we allowed it to evaluate to completion. &GroupsTransformation{Expression: `groups.filter(x, groups.all(x, true))`}, }, - wantEvaluationErr: `identity transformation at index 0: operation interrupted`, + wantEvaluationErr: `identity transformation at index 0: context deadline exceeded`, }, { name: "slow policy transformation expressions are canceled after a maximum allowed duration", @@ -660,7 +660,7 @@ func TestTransformer(t *testing.T) { // On my laptop, evaluating this expression would take ~20 seconds if we allowed it to evaluate to completion. &AllowAuthenticationPolicy{Expression: `groups.all(x, groups.all(x, true))`}, }, - wantEvaluationErr: `identity transformation at index 0: operation interrupted`, + wantEvaluationErr: `identity transformation at index 0: context deadline exceeded`, }, { name: "compile errors are returned by the compile step for a username transform",