Skip to content

Commit 4fa89d4

Browse files
committed
Fix tests
1 parent fe925a3 commit 4fa89d4

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

provisioner/terraform/parse_test.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ func TestParse(t *testing.T) {
5252
Type: &proto.Parse_Response_Complete{
5353
Complete: &proto.Parse_Complete{
5454
ParameterSchemas: []*proto.ParameterSchema{{
55-
Name: "A",
56-
RedisplayValue: true,
57-
Description: "Testing!",
55+
Name: "A",
56+
RedisplayValue: true,
57+
AllowOverrideSource: true,
58+
Description: "Testing!",
5859
DefaultDestination: &proto.ParameterDestination{
5960
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
6061
},
@@ -73,11 +74,12 @@ func TestParse(t *testing.T) {
7374
Type: &proto.Parse_Response_Complete{
7475
Complete: &proto.Parse_Complete{
7576
ParameterSchemas: []*proto.ParameterSchema{{
76-
Name: "A",
77-
RedisplayValue: true,
77+
Name: "A",
78+
RedisplayValue: true,
79+
AllowOverrideSource: true,
7880
DefaultSource: &proto.ParameterSource{
7981
Scheme: proto.ParameterSource_DATA,
80-
Value: "\"wow\"",
82+
Value: "wow",
8183
},
8284
DefaultDestination: &proto.ParameterDestination{
8385
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
@@ -103,6 +105,7 @@ func TestParse(t *testing.T) {
103105
RedisplayValue: true,
104106
ValidationCondition: `var.A == "value"`,
105107
ValidationTypeSystem: proto.ParameterSchema_HCL,
108+
AllowOverrideSource: true,
106109
DefaultDestination: &proto.ParameterDestination{
107110
Scheme: proto.ParameterDestination_PROVISIONER_VARIABLE,
108111
},

provisionersdk/archive_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ func TestUntar(t *testing.T) {
3232
dir = t.TempDir()
3333
err = provisionersdk.Untar(dir, archive)
3434
require.NoError(t, err)
35-
_, err = os.Stat(filepath.Join(dir, file.Name()))
35+
_, err = os.Stat(filepath.Join(dir, filepath.Base(file.Name())))
3636
require.NoError(t, err)
3737
}

0 commit comments

Comments
 (0)