pulumi/tests/integration/stack_project_name/index.ts
Pat Gavlin a23b10a9bf
Update the copyright end date to 2018. (#1068)
Just what it says on the tin.
2018-03-21 12:43:21 -07:00

17 lines
575 B
TypeScript

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
import * as pulumi from "@pulumi/pulumi";
const stackName = pulumi.getStack();
if (!stackName) {
// We can't check for a specific stack name, since it is autogenerated by the test framework. But
// we *can* verify that it isn't blank.
throw new Error("Empty pulumi.getStack() at runtime");
}
const expName = "stack_project_name";
const projName = pulumi.getProject();
if (projName !== expName) {
throw new Error(`Unexpected pulumi.getProject(); wanted '${expName}', got '${projName}'`);
}