open-nomad/api/constraint_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
424 B
Go
Raw Permalink Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2015-09-09 20:02:39 +00:00
package api
import (
"testing"
"github.com/hashicorp/nomad/api/internal/testutil"
"github.com/shoenig/test/must"
2015-09-09 20:02:39 +00:00
)
func TestCompose_Constraints(t *testing.T) {
testutil.Parallel(t)
c := NewConstraint("kernel.name", "=", "darwin")
2015-09-09 20:02:39 +00:00
expect := &Constraint{
LTarget: "kernel.name",
RTarget: "darwin",
Operand: "=",
}
must.Eq(t, expect, c)
2015-09-09 20:02:39 +00:00
}