feat: Add dry run for provisioners (#178)

* refactor: Rename ProjectParameter to ProjectVersionParameter

This was confusing with ParameterValue before. It still is a bit,
but this should help distinguish scope.

* Add project version resources table

* Allow project parameters to optionally have user and workspace

* Add dry run for provisioners

* Add resource detection on project import
This commit is contained in:
Kyle Carberry
2022-02-07 19:35:18 -06:00
committed by GitHub
parent 427fdc6c64
commit 795bba2af4
20 changed files with 764 additions and 325 deletions

View File

@ -22,7 +22,14 @@ func TestCompute(t *testing.T) {
OrganizationID: uuid.New().String(),
ProjectID: uuid.New(),
ProjectVersionID: uuid.New(),
UserID: uuid.NewString(),
WorkspaceID: uuid.NullUUID{
UUID: uuid.New(),
Valid: true,
},
UserID: sql.NullString{
String: uuid.NewString(),
Valid: true,
},
}
}
type projectParameterOptions struct {
@ -163,7 +170,7 @@ func TestCompute(t *testing.T) {
ID: uuid.New(),
Name: parameter.Name,
Scope: database.ParameterScopeWorkspace,
ScopeID: scope.WorkspaceID.String(),
ScopeID: scope.WorkspaceID.UUID.String(),
SourceScheme: database.ParameterSourceSchemeData,
SourceValue: "nop",
DestinationScheme: database.ParameterDestinationSchemeEnvironmentVariable,
@ -189,7 +196,7 @@ func TestCompute(t *testing.T) {
ID: uuid.New(),
Name: parameter.Name,
Scope: database.ParameterScopeWorkspace,
ScopeID: scope.WorkspaceID.String(),
ScopeID: scope.WorkspaceID.UUID.String(),
SourceScheme: database.ParameterSourceSchemeData,
SourceValue: "nop",
DestinationScheme: database.ParameterDestinationSchemeEnvironmentVariable,