Skip to content

Commit

Permalink
Trusty: Add simple test for PR template
Browse files Browse the repository at this point in the history
This commit adds a simple test to ensure the comment template
parses correctly.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@stacklok.com>
  • Loading branch information
puerco committed May 10, 2024
1 parent 0225550 commit ab6ec59
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions internal/engine/eval/trusty/actions_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2023 Stacklok, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package trusty provides an evaluator that uses the trusty API
package trusty

import (
"testing"

"github.com/stretchr/testify/require"

v1 "github.com/stacklok/minder/pkg/api/protobuf/go/minder/v1"
)

func TestNewSummaryPrHandler(t *testing.T) {
t.Parallel()

// newSummaryPrHandler must never fail. The only failure point
// right now is the pr comment template
_, err := newSummaryPrHandler(&v1.PullRequest{}, nil, "")
require.NoError(t, err)
}

0 comments on commit ab6ec59

Please sign in to comment.