mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
16 lines
377 B
Go
16 lines
377 B
Go
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestAnnotate(t *testing.T) {
|
|
obj := Annotate(NewPod(), "foo", "bar")
|
|
assert.Equal(t, "bar", obj.GetAnnotations()["foo"])
|
|
|
|
obj = Annotate(Annotate(NewPod(), "foo", "bar"), "baz", "qux")
|
|
assert.Equal(t, "bar", obj.GetAnnotations()["foo"])
|
|
assert.Equal(t, "qux", obj.GetAnnotations()["baz"])
|
|
}
|