MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / TestMatchesParameters

Function TestMatchesParameters

pkg/policies/engine/wasm/engine_test.go:86–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestMatchesParameters(t *testing.T) {
87 eng := NewEngine()
88
89 ctx := context.Background()
90 policy := &engine.Policy{
91 Name: "test-policy",
92 Source: []byte{},
93 }
94
95 // Should always return true for WASM policies
96 matches, err := eng.MatchesParameters(ctx, policy, map[string]string{"key": "value"}, map[string]string{"key": "value"})
97 assert.NoError(t, err)
98 assert.True(t, matches)
99}
100
101func TestMatchesEvaluation(t *testing.T) {
102 eng := NewEngine()

Callers

nothing calls this directly

Calls 2

MatchesParametersMethod · 0.95
NewEngineFunction · 0.70

Tested by

no test coverage detected