@@ -41,6 +41,9 @@ func TestInjection(t *testing.T) {
41
41
"index.html" : & fstest.MapFile {
42
42
Data : []byte ("{{ .User }}" ),
43
43
},
44
+ "install.sh" : & fstest.MapFile {
45
+ Data : []byte {},
46
+ },
44
47
}
45
48
binFs := http .FS (fstest.MapFS {})
46
49
db := dbmem .New ()
@@ -99,6 +102,9 @@ func TestInjectionFailureProducesCleanHTML(t *testing.T) {
99
102
"index.html" : & fstest.MapFile {
100
103
Data : []byte ("<html>{{ .User }}</html>" ),
101
104
},
105
+ "install.sh" : & fstest.MapFile {
106
+ Data : []byte {},
107
+ },
102
108
}
103
109
handler := site .New (& site.Options {
104
110
BinFS : binFs ,
@@ -144,6 +150,9 @@ func TestCaching(t *testing.T) {
144
150
"terminal.html" : & fstest.MapFile {
145
151
Data : []byte ("folderFile" ),
146
152
},
153
+ "install.sh" : & fstest.MapFile {
154
+ Data : []byte {},
155
+ },
147
156
}
148
157
binFS := http .FS (fstest.MapFS {})
149
158
@@ -207,6 +216,9 @@ func TestServingFiles(t *testing.T) {
207
216
"dashboard.css" : & fstest.MapFile {
208
217
Data : []byte ("dashboard-css-bytes" ),
209
218
},
219
+ "install.sh" : & fstest.MapFile {
220
+ Data : []byte ("install-sh-bytes" ),
221
+ },
210
222
}
211
223
binFS := http .FS (fstest.MapFS {})
212
224
@@ -248,6 +260,9 @@ func TestServingFiles(t *testing.T) {
248
260
// JS, CSS cases
249
261
{"/dashboard.js" , "dashboard-js-bytes" },
250
262
{"/dashboard.css" , "dashboard-css-bytes" },
263
+
264
+ // Install script
265
+ {"/install.sh" , "install-sh-bytes" },
251
266
}
252
267
253
268
for _ , testCase := range testCases {
@@ -348,6 +363,9 @@ func TestServingBin(t *testing.T) {
348
363
"dashboard.css" : & fstest.MapFile {
349
364
Data : []byte ("dashboard-css-bytes" ),
350
365
},
366
+ "install.sh" : & fstest.MapFile {
367
+ Data : []byte {},
368
+ },
351
369
}
352
370
353
371
sampleBinFSCorrupted := sampleBinFS ()
0 commit comments