Skip to content

Commit 5c065a9

Browse files
committed
More parameter references
1 parent 022224e commit 5c065a9

File tree

6 files changed

+0
-98
lines changed

6 files changed

+0
-98
lines changed

cli/create_test.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -574,39 +574,3 @@ func TestCreateWithGitAuth(t *testing.T) {
574574
pty.ExpectMatch("Confirm create?")
575575
pty.WriteLine("yes")
576576
}
577-
578-
func createTestParseResponseWithDefault(defaultValue string) []*proto.Parse_Response {
579-
return []*proto.Parse_Response{{
580-
Type: &proto.Parse_Response_Complete{
581-
Complete: &proto.Parse_Complete{
582-
ParameterSchemas: []*proto.ParameterSchema{
583-
{
584-
AllowOverrideSource: true,
585-
Name: "region",
586-
Description: "description 1",
587-
DefaultSource: &proto.ParameterSource{
588-
Scheme: proto.ParameterSource_DATA,
589-
Value: defaultValue,
590-
},
591-
DefaultDestination: &proto.ParameterDestination{
592-
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
593-
},
594-
},
595-
{
596-
AllowOverrideSource: true,
597-
Name: "username",
598-
Description: "description 2",
599-
DefaultSource: &proto.ParameterSource{
600-
Scheme: proto.ParameterSource_DATA,
601-
// No default value
602-
Value: "",
603-
},
604-
DefaultDestination: &proto.ParameterDestination{
605-
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
606-
},
607-
},
608-
},
609-
},
610-
},
611-
}}
612-
}

cli/templatecreate_test.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -302,23 +302,6 @@ func TestTemplateCreate(t *testing.T) {
302302
})
303303
}
304304

305-
func createTestParseResponse() []*proto.Parse_Response {
306-
return []*proto.Parse_Response{{
307-
Type: &proto.Parse_Response_Complete{
308-
Complete: &proto.Parse_Complete{
309-
ParameterSchemas: []*proto.ParameterSchema{{
310-
AllowOverrideSource: true,
311-
Name: "region",
312-
Description: "description",
313-
DefaultDestination: &proto.ParameterDestination{
314-
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
315-
},
316-
}},
317-
},
318-
},
319-
}}
320-
}
321-
322305
// Need this for Windows because of a known issue with Go:
323306
// https://github.com/golang/go/issues/52986
324307
func removeTmpDirUntilSuccessAfterTest(t *testing.T, tempDir string) {

cli/templatepush_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"runtime"
99
"testing"
1010

11-
"github.com/google/uuid"
1211
"github.com/stretchr/testify/assert"
1312
"github.com/stretchr/testify/require"
1413

@@ -409,17 +408,6 @@ func TestTemplatePush(t *testing.T) {
409408
})
410409
}
411410

412-
func latestTemplateVersion(t *testing.T, client *codersdk.Client, templateID uuid.UUID) codersdk.TemplateVersion {
413-
t.Helper()
414-
415-
ctx := context.Background()
416-
newTemplate, err := client.Template(ctx, templateID)
417-
require.NoError(t, err)
418-
tv, err := client.TemplateVersion(ctx, newTemplate.ActiveVersionID)
419-
require.NoError(t, err)
420-
return tv
421-
}
422-
423411
func createEchoResponsesWithTemplateVariables(templateVariables []*proto.TemplateVariable) *echo.Responses {
424412
return &echo.Responses{
425413
Parse: []*proto.Parse_Response{

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,37 +1404,6 @@ func obtainOIDCAccessToken(ctx context.Context, db database.Store, oidcConfig ht
14041404
return link.OAuthAccessToken, nil
14051405
}
14061406

1407-
func convertValidationTypeSystem(typeSystem sdkproto.ParameterSchema_TypeSystem) (database.ParameterTypeSystem, error) {
1408-
switch typeSystem {
1409-
case sdkproto.ParameterSchema_None:
1410-
return database.ParameterTypeSystemNone, nil
1411-
case sdkproto.ParameterSchema_HCL:
1412-
return database.ParameterTypeSystemHCL, nil
1413-
default:
1414-
return database.ParameterTypeSystem(""), xerrors.Errorf("unknown type system: %d", typeSystem)
1415-
}
1416-
}
1417-
1418-
func convertParameterSourceScheme(sourceScheme sdkproto.ParameterSource_Scheme) (database.ParameterSourceScheme, error) {
1419-
switch sourceScheme {
1420-
case sdkproto.ParameterSource_DATA:
1421-
return database.ParameterSourceSchemeData, nil
1422-
default:
1423-
return database.ParameterSourceScheme(""), xerrors.Errorf("unknown parameter source scheme: %d", sourceScheme)
1424-
}
1425-
}
1426-
1427-
func convertParameterDestinationScheme(destinationScheme sdkproto.ParameterDestination_Scheme) (database.ParameterDestinationScheme, error) {
1428-
switch destinationScheme {
1429-
case sdkproto.ParameterDestination_ENVIRONMENT_VARIABLE:
1430-
return database.ParameterDestinationSchemeEnvironmentVariable, nil
1431-
case sdkproto.ParameterDestination_PROVISIONER_VARIABLE:
1432-
return database.ParameterDestinationSchemeProvisionerVariable, nil
1433-
default:
1434-
return database.ParameterDestinationScheme(""), xerrors.Errorf("unknown parameter destination scheme: %d", destinationScheme)
1435-
}
1436-
}
1437-
14381407
func convertLogLevel(logLevel sdkproto.LogLevel) (database.LogLevel, error) {
14391408
switch logLevel {
14401409
case sdkproto.LogLevel_TRACE:

coderd/wsbuilder/wsbuilder.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type Builder struct {
5555
lastBuild *database.WorkspaceBuild
5656
lastBuildErr *error
5757
lastBuildParameters *[]database.WorkspaceBuildParameter
58-
lastParameterValues *[]database.ParameterValue
5958
lastBuildJob *database.ProvisionerJob
6059
}
6160

site/src/pages/CreateTemplatePage/CreateTemplatePage.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ test("Create template with variables", async () => {
9595
)
9696
expect(API.createTemplateVersion).toHaveBeenCalledWith(MockOrganization.id, {
9797
file_id: MockProvisionerJob.file_id,
98-
parameter_values: [],
9998
provisioner: "terraform",
10099
storage_method: "file",
101100
tags: {},

0 commit comments

Comments
 (0)