@@ -72,60 +72,77 @@ func TestParseTest(t *testing.T) {
72
72
"defaults" : {
73
73
args : nil ,
74
74
want : & Test {
75
- Filter : nil ,
76
- TestDirectory : "tests" ,
77
- ViewType : ViewHuman ,
78
- Vars : & Vars {},
75
+ Filter : nil ,
76
+ TestDirectory : "tests" ,
77
+ ViewType : ViewHuman ,
78
+ Vars : & Vars {},
79
+ OperationParallelism : 10 ,
79
80
},
80
81
wantDiags : nil ,
81
82
},
82
83
"with-filters" : {
83
84
args : []string {"-filter=one.tftest.hcl" , "-filter=two.tftest.hcl" },
84
85
want : & Test {
85
- Filter : []string {"one.tftest.hcl" , "two.tftest.hcl" },
86
- TestDirectory : "tests" ,
87
- ViewType : ViewHuman ,
88
- Vars : & Vars {},
86
+ Filter : []string {"one.tftest.hcl" , "two.tftest.hcl" },
87
+ TestDirectory : "tests" ,
88
+ ViewType : ViewHuman ,
89
+ Vars : & Vars {},
90
+ OperationParallelism : 10 ,
89
91
},
90
92
wantDiags : nil ,
91
93
},
92
94
"json" : {
93
95
args : []string {"-json" },
94
96
want : & Test {
95
- Filter : nil ,
96
- TestDirectory : "tests" ,
97
- ViewType : ViewJSON ,
98
- Vars : & Vars {},
97
+ Filter : nil ,
98
+ TestDirectory : "tests" ,
99
+ ViewType : ViewJSON ,
100
+ Vars : & Vars {},
101
+ OperationParallelism : 10 ,
99
102
},
100
103
wantDiags : nil ,
101
104
},
102
105
"test-directory" : {
103
106
args : []string {"-test-directory=other" },
104
107
want : & Test {
105
- Filter : nil ,
106
- TestDirectory : "other" ,
107
- ViewType : ViewHuman ,
108
- Vars : & Vars {},
108
+ Filter : nil ,
109
+ TestDirectory : "other" ,
110
+ ViewType : ViewHuman ,
111
+ Vars : & Vars {},
112
+ OperationParallelism : 10 ,
109
113
},
110
114
wantDiags : nil ,
111
115
},
112
116
"verbose" : {
113
117
args : []string {"-verbose" },
114
118
want : & Test {
115
- Filter : nil ,
116
- TestDirectory : "tests" ,
117
- ViewType : ViewHuman ,
118
- Verbose : true ,
119
- Vars : & Vars {},
119
+ Filter : nil ,
120
+ TestDirectory : "tests" ,
121
+ ViewType : ViewHuman ,
122
+ Verbose : true ,
123
+ Vars : & Vars {},
124
+ OperationParallelism : 10 ,
120
125
},
121
126
},
127
+ "with-parallelism-set" : {
128
+ args : []string {"-parallelism=5" },
129
+ want : & Test {
130
+ Filter : nil ,
131
+ TestDirectory : "tests" ,
132
+ ViewType : ViewHuman ,
133
+ Vars : & Vars {},
134
+ OperationParallelism : 5 ,
135
+ },
136
+ wantDiags : nil ,
137
+ },
122
138
"unknown flag" : {
123
139
args : []string {"-boop" },
124
140
want : & Test {
125
- Filter : nil ,
126
- TestDirectory : "tests" ,
127
- ViewType : ViewHuman ,
128
- Vars : & Vars {},
141
+ Filter : nil ,
142
+ TestDirectory : "tests" ,
143
+ ViewType : ViewHuman ,
144
+ Vars : & Vars {},
145
+ OperationParallelism : 10 ,
129
146
},
130
147
wantDiags : tfdiags.Diagnostics {
131
148
tfdiags .Sourceless (
0 commit comments