pulumi/cmd/config_test.go

20 lines
526 B
Go
Raw Normal View History

2017-10-18 19:10:04 +02:00
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package cmd
import (
"testing"
"github.com/pulumi/pulumi/pkg/pack"
"github.com/pulumi/pulumi/pkg/tokens"
"github.com/stretchr/testify/assert"
)
func TestPrettyKeyForPackage(t *testing.T) {
pkg := &pack.Package{Name: tokens.PackageName("test-package"), Runtime: "nodejs"}
2017-10-18 19:10:04 +02:00
assert.Equal(t, "foo", prettyKeyForPackage("test-package:config:foo", pkg))
assert.Equal(t, "other-package:config:bar", prettyKeyForPackage("other-package:config:bar", pkg))
}