File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -124,24 +124,27 @@ func TestValidateDevices(t *testing.T) {
124
124
125
125
func TestValidateBuildOtaFile (t * testing.T ) {
126
126
127
- file , err := buildOtaFile (& MassUploadParams {
127
+ file , tmp , err := buildOtaFile (& MassUploadParams {
128
128
File : cloudFirmwareFilename ,
129
129
DoNotApplyHeader : false ,
130
130
FQBN : "arduino:samd:nano_33_iot" ,
131
131
})
132
132
assert .Nil (t , err )
133
133
assert .NotNil (t , file )
134
134
assert .True (t , strings .HasSuffix (file , "temp.ota" ))
135
+ assert .NotEmpty (t , tmp )
136
+ defer os .RemoveAll (tmp )
135
137
}
136
138
137
139
func TestValidateBuildOtaFile_whenNoHeaderIsRequested (t * testing.T ) {
138
140
139
- file , err := buildOtaFile (& MassUploadParams {
141
+ file , tmp , err := buildOtaFile (& MassUploadParams {
140
142
File : cloudFirmwareFilename ,
141
143
DoNotApplyHeader : true ,
142
144
FQBN : "arduino:samd:nano_33_iot" ,
143
145
})
144
146
assert .Nil (t , err )
145
147
assert .NotNil (t , file )
146
148
assert .Equal (t , cloudFirmwareFilename , file )
149
+ assert .Empty (t , tmp )
147
150
}
You can’t perform that action at this time.
0 commit comments