pulumi/cmd/config_test.go
Matt Ellis 9cf9428638 Save config information in Pulumi.yaml
Instead of having information stored in the checkpoint file, save it
in the Pulumi.yaml file. We introduce a new section `stacks` which
holds information specific to a stack.

Next, we'll support adding configuration information that applies
to *all* stacks for a Program and allow the stack specific config to
overwrite or augment it.
2017-10-20 13:30:07 -07:00

20 lines
526 B
Go

// 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"}
assert.Equal(t, "foo", prettyKeyForPackage("test-package:config:foo", pkg))
assert.Equal(t, "other-package:config:bar", prettyKeyForPackage("other-package:config:bar", pkg))
}