flux_test_gen.go 36.8 KB
Newer Older
1
2
3
4
5
// DO NOT EDIT: This file is autogenerated via the builtin command.

package secrets

import (
Jeremy Norris's avatar
Jeremy Norris committed
6
7
	ast "gitlab.qobserve.com/teamq/flux/ast"
	parser "gitlab.qobserve.com/teamq/flux/internal/parser"
8
9
10
11
12
13
14
15
16
17
18
19
)

var FluxTestPackages = []*ast.Package{&ast.Package{
	BaseNode: ast.BaseNode{
		Errors: nil,
		Loc:    nil,
	},
	Files: []*ast.File{&ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
20
					Column: 100,
21
					Line:   31,
22
				},
23
				File:   "secrets_test.flux",
24
				Source: "package secrets_test\n\nimport \"testing\"\nimport \"influxdata/influxdb/secrets\"\n\noption now = () => (2030-01-01T00:00:00Z)\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string\n#group,false,false,false,false,true,true\n#default,_result,,,,,\n,result,table,_time,_value,_field,_measurement\n,,0,2018-05-22T19:53:26Z,1.83,load1,system\n\"\n\noutData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,token\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,mysecrettoken\n\"\n\ntoken = secrets.get(key: \"token\")\nt_get_secret = (table=<-) =>\n\ttable\n    |> set(key: \"token\", value: token)\n    |> drop(columns: [\"_start\", \"_stop\"])\n\ntest _get_secret = () =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_get_secret})",
25
26
27
28
29
30
31
32
33
34
35
36
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.OptionStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
37
							Column: 42,
38
39
							Line:   6,
						},
40
						File:   "secrets_test.flux",
41
						Source: "now = () => (2030-01-01T00:00:00Z)",
42
43
44
45
46
47
48
49
50
51
52
53
54
55
						Start: ast.Position{
							Column: 8,
							Line:   6,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   6,
							},
56
							File:   "secrets_test.flux",
57
58
59
60
61
62
63
64
65
66
67
68
69
70
							Source: "now",
							Start: ast.Position{
								Column: 8,
								Line:   6,
							},
						},
					},
					Name: "now",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
71
								Column: 42,
72
73
								Line:   6,
							},
74
							File:   "secrets_test.flux",
75
							Source: "() => (2030-01-01T00:00:00Z)",
76
77
78
79
80
81
							Start: ast.Position{
								Column: 14,
								Line:   6,
							},
						},
					},
82
					Body: &ast.ParenExpression{
83
84
85
86
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
87
									Column: 42,
88
89
									Line:   6,
								},
90
								File:   "secrets_test.flux",
91
								Source: "(2030-01-01T00:00:00Z)",
92
								Start: ast.Position{
93
									Column: 20,
94
95
96
97
									Line:   6,
								},
							},
						},
98
99
100
101
102
103
104
105
						Expression: &ast.DateTimeLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   6,
									},
106
									File:   "secrets_test.flux",
107
108
109
110
111
112
113
114
115
									Source: "2030-01-01T00:00:00Z",
									Start: ast.Position{
										Column: 21,
										Line:   6,
									},
								},
							},
							Value: parser.MustParseTime("2030-01-01T00:00:00Z"),
						},
116
					},
yukta's avatar
yukta committed
117
					Params: []*ast.Property{},
118
119
120
121
122
123
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
124
						Column: 42,
125
126
						Line:   6,
					},
127
					File:   "secrets_test.flux",
128
					Source: "option now = () => (2030-01-01T00:00:00Z)",
129
130
131
132
133
134
135
136
137
138
139
140
141
142
					Start: ast.Position{
						Column: 1,
						Line:   6,
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   14,
					},
143
					File:   "secrets_test.flux",
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
					Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string\n#group,false,false,false,false,true,true\n#default,_result,,,,,\n,result,table,_time,_value,_field,_measurement\n,,0,2018-05-22T19:53:26Z,1.83,load1,system\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   8,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 7,
							Line:   8,
						},
159
						File:   "secrets_test.flux",
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
						Source: "inData",
						Start: ast.Position{
							Column: 1,
							Line:   8,
						},
					},
				},
				Name: "inData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   14,
						},
177
						File:   "secrets_test.flux",
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string\n#group,false,false,false,false,true,true\n#default,_result,,,,,\n,result,table,_time,_value,_field,_measurement\n,,0,2018-05-22T19:53:26Z,1.83,load1,system\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   8,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string\n#group,false,false,false,false,true,true\n#default,_result,,,,,\n,result,table,_time,_value,_field,_measurement\n,,0,2018-05-22T19:53:26Z,1.83,load1,system\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   22,
					},
195
					File:   "secrets_test.flux",
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
					Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,token\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,mysecrettoken\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   16,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   16,
						},
211
						File:   "secrets_test.flux",
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   16,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   22,
						},
229
						File:   "secrets_test.flux",
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,token\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,mysecrettoken\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   16,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,token\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,mysecrettoken\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 34,
						Line:   24,
					},
247
					File:   "secrets_test.flux",
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
					Source: "token = secrets.get(key: \"token\")",
					Start: ast.Position{
						Column: 1,
						Line:   24,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 6,
							Line:   24,
						},
263
						File:   "secrets_test.flux",
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
						Source: "token",
						Start: ast.Position{
							Column: 1,
							Line:   24,
						},
					},
				},
				Name: "token",
			},
			Init: &ast.CallExpression{
				Arguments: []ast.Expression{&ast.ObjectExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 33,
								Line:   24,
							},
282
							File:   "secrets_test.flux",
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
							Source: "key: \"token\"",
							Start: ast.Position{
								Column: 21,
								Line:   24,
							},
						},
					},
					Properties: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 33,
									Line:   24,
								},
298
								File:   "secrets_test.flux",
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
								Source: "key: \"token\"",
								Start: ast.Position{
									Column: 21,
									Line:   24,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 24,
										Line:   24,
									},
314
									File:   "secrets_test.flux",
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
									Source: "key",
									Start: ast.Position{
										Column: 21,
										Line:   24,
									},
								},
							},
							Name: "key",
						},
						Value: &ast.StringLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 33,
										Line:   24,
									},
332
									File:   "secrets_test.flux",
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
									Source: "\"token\"",
									Start: ast.Position{
										Column: 26,
										Line:   24,
									},
								},
							},
							Value: "token",
						},
					}},
					With: nil,
				}},
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 34,
							Line:   24,
						},
352
						File:   "secrets_test.flux",
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
						Source: "secrets.get(key: \"token\")",
						Start: ast.Position{
							Column: 9,
							Line:   24,
						},
					},
				},
				Callee: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 20,
								Line:   24,
							},
368
							File:   "secrets_test.flux",
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
							Source: "secrets.get",
							Start: ast.Position{
								Column: 9,
								Line:   24,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 16,
									Line:   24,
								},
384
								File:   "secrets_test.flux",
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
								Source: "secrets",
								Start: ast.Position{
									Column: 9,
									Line:   24,
								},
							},
						},
						Name: "secrets",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 20,
									Line:   24,
								},
402
								File:   "secrets_test.flux",
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
								Source: "get",
								Start: ast.Position{
									Column: 17,
									Line:   24,
								},
							},
						},
						Name: "get",
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
419
420
						Column: 42,
						Line:   28,
421
					},
422
					File:   "secrets_test.flux",
423
					Source: "t_get_secret = (table=<-) =>\n\ttable\n    |> set(key: \"token\", value: token)\n    |> drop(columns: [\"_start\", \"_stop\"])",
424
425
426
427
428
429
430
431
432
433
434
435
436
437
					Start: ast.Position{
						Column: 1,
						Line:   25,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 13,
							Line:   25,
						},
438
						File:   "secrets_test.flux",
439
440
441
442
443
444
445
446
447
448
449
450
451
452
						Source: "t_get_secret",
						Start: ast.Position{
							Column: 1,
							Line:   25,
						},
					},
				},
				Name: "t_get_secret",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
453
454
							Column: 42,
							Line:   28,
455
						},
456
						File:   "secrets_test.flux",
457
						Source: "(table=<-) =>\n\ttable\n    |> set(key: \"token\", value: token)\n    |> drop(columns: [\"_start\", \"_stop\"])",
458
459
460
461
462
463
464
						Start: ast.Position{
							Column: 16,
							Line:   25,
						},
					},
				},
				Body: &ast.PipeExpression{
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
					Argument: &ast.PipeExpression{
						Argument: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 7,
										Line:   26,
									},
									File:   "secrets_test.flux",
									Source: "table",
									Start: ast.Position{
										Column: 2,
										Line:   26,
									},
								},
							},
							Name: "table",
						},
484
485
486
487
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
488
489
									Column: 39,
									Line:   27,
490
								},
491
								File:   "secrets_test.flux",
492
								Source: "table\n    |> set(key: \"token\", value: token)",
493
494
495
496
497
498
								Start: ast.Position{
									Column: 2,
									Line:   26,
								},
							},
						},
499
500
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
501
502
503
504
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
505
											Column: 38,
506
507
											Line:   27,
										},
508
										File:   "secrets_test.flux",
509
										Source: "key: \"token\", value: token",
510
511
512
513
514
515
										Start: ast.Position{
											Column: 12,
											Line:   27,
										},
									},
								},
516
								Properties: []*ast.Property{&ast.Property{
517
518
519
520
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
521
												Column: 24,
522
523
												Line:   27,
											},
524
											File:   "secrets_test.flux",
525
											Source: "key: \"token\"",
526
527
528
529
530
531
											Start: ast.Position{
												Column: 12,
												Line:   27,
											},
										},
									},
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 15,
													Line:   27,
												},
												File:   "secrets_test.flux",
												Source: "key",
												Start: ast.Position{
													Column: 12,
													Line:   27,
												},
											},
										},
										Name: "key",
									},
									Value: &ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 24,
													Line:   27,
												},
												File:   "secrets_test.flux",
												Source: "\"token\"",
												Start: ast.Position{
													Column: 17,
													Line:   27,
												},
											},
										},
										Value: "token",
									},
								}, &ast.Property{
569
570
571
572
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
573
												Column: 38,
574
575
												Line:   27,
											},
576
											File:   "secrets_test.flux",
577
											Source: "value: token",
578
											Start: ast.Position{
579
												Column: 26,
580
581
582
583
												Line:   27,
											},
										},
									},
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 31,
													Line:   27,
												},
												File:   "secrets_test.flux",
												Source: "value",
												Start: ast.Position{
													Column: 26,
													Line:   27,
												},
											},
										},
										Name: "value",
									},
									Value: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 38,
													Line:   27,
												},
												File:   "secrets_test.flux",
												Source: "token",
												Start: ast.Position{
													Column: 33,
													Line:   27,
												},
											},
										},
										Name: "token",
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 39,
										Line:   27,
									},
									File:   "secrets_test.flux",
									Source: "set(key: \"token\", value: token)",
									Start: ast.Position{
										Column: 8,
										Line:   27,
									},
636
								},
637
638
							},
							Callee: &ast.Identifier{
639
640
641
642
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
643
											Column: 11,
644
645
											Line:   27,
										},
646
										File:   "secrets_test.flux",
647
										Source: "set",
648
										Start: ast.Position{
649
											Column: 8,
650
651
652
653
											Line:   27,
										},
									},
								},
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
								Name: "set",
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 42,
								Line:   28,
							},
							File:   "secrets_test.flux",
							Source: "table\n    |> set(key: \"token\", value: token)\n    |> drop(columns: [\"_start\", \"_stop\"])",
							Start: ast.Position{
								Column: 2,
								Line:   26,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   28,
									},
									File:   "secrets_test.flux",
									Source: "columns: [\"_start\", \"_stop\"]",
									Start: ast.Position{
										Column: 13,
										Line:   28,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   28,
										},
										File:   "secrets_test.flux",
										Source: "columns: [\"_start\", \"_stop\"]",
										Start: ast.Position{
											Column: 13,
											Line:   28,
										},
									},
								},
706
707
708
709
710
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
711
712
												Column: 20,
												Line:   28,
713
											},
714
											File:   "secrets_test.flux",
715
											Source: "columns",
716
											Start: ast.Position{
717
718
												Column: 13,
												Line:   28,
719
720
721
											},
										},
									},
722
									Name: "columns",
723
								},
724
								Value: &ast.ArrayExpression{
725
726
727
728
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
729
730
												Column: 41,
												Line:   28,
731
											},
732
											File:   "secrets_test.flux",
733
											Source: "[\"_start\", \"_stop\"]",
734
											Start: ast.Position{
735
736
												Column: 22,
												Line:   28,
737
738
739
											},
										},
									},
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
									Elements: []ast.Expression{&ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 31,
													Line:   28,
												},
												File:   "secrets_test.flux",
												Source: "\"_start\"",
												Start: ast.Position{
													Column: 23,
													Line:   28,
												},
											},
										},
										Value: "_start",
									}, &ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   28,
												},
												File:   "secrets_test.flux",
												Source: "\"_stop\"",
												Start: ast.Position{
													Column: 33,
													Line:   28,
												},
											},
										},
										Value: "_stop",
									}},
775
776
777
778
779
780
781
782
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
783
784
									Column: 42,
									Line:   28,
785
								},
786
								File:   "secrets_test.flux",
787
								Source: "drop(columns: [\"_start\", \"_stop\"])",
788
789
								Start: ast.Position{
									Column: 8,
790
									Line:   28,
791
792
793
794
795
796
797
798
								},
							},
						},
						Callee: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
799
800
										Column: 12,
										Line:   28,
801
									},
802
									File:   "secrets_test.flux",
803
									Source: "drop",
804
805
									Start: ast.Position{
										Column: 8,
806
										Line:   28,
807
808
809
									},
								},
							},
810
							Name: "drop",
811
812
813
814
815
816
817
818
819
820
821
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 25,
								Line:   25,
							},
822
							File:   "secrets_test.flux",
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
							Source: "table=<-",
							Start: ast.Position{
								Column: 17,
								Line:   25,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 22,
									Line:   25,
								},
838
								File:   "secrets_test.flux",
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
								Source: "table",
								Start: ast.Position{
									Column: 17,
									Line:   25,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 25,
								Line:   25,
							},
855
							File:   "secrets_test.flux",
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
							Source: "<-",
							Start: ast.Position{
								Column: 23,
								Line:   25,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
871
							Column: 100,
872
							Line:   31,
873
						},
874
						File:   "secrets_test.flux",
875
						Source: "_get_secret = () =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_get_secret})",
876
877
						Start: ast.Position{
							Column: 6,
878
							Line:   30,
879
880
881
882
883
884
885
886
887
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 17,
888
								Line:   30,
889
							},
890
							File:   "secrets_test.flux",
891
892
893
							Source: "_get_secret",
							Start: ast.Position{
								Column: 6,
894
								Line:   30,
895
896
897
898
899
900
901
902
903
904
							},
						},
					},
					Name: "_get_secret",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
905
								Column: 100,
906
								Line:   31,
907
							},
908
							File:   "secrets_test.flux",
909
							Source: "() =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_get_secret})",
910
911
							Start: ast.Position{
								Column: 20,
912
								Line:   30,
913
914
915
							},
						},
					},
916
					Body: &ast.ParenExpression{
917
918
919
920
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
921
									Column: 100,
922
									Line:   31,
923
								},
924
								File:   "secrets_test.flux",
925
								Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_get_secret})",
926
								Start: ast.Position{
927
									Column: 2,
928
									Line:   31,
929
930
931
								},
							},
						},
932
						Expression: &ast.ObjectExpression{
933
934
935
936
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
937
										Column: 99,
938
										Line:   31,
939
									},
940
									File:   "secrets_test.flux",
941
									Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_get_secret}",
942
									Start: ast.Position{
943
										Column: 3,
944
										Line:   31,
945
946
947
									},
								},
							},
948
							Properties: []*ast.Property{&ast.Property{
949
950
951
952
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
953
											Column: 43,
954
											Line:   31,
955
										},
956
										File:   "secrets_test.flux",
957
										Source: "input: testing.loadStorage(csv: inData)",
958
959
										Start: ast.Position{
											Column: 4,
960
											Line:   31,
961
962
963
										},
									},
								},
964
								Key: &ast.Identifier{
965
966
967
968
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
969
												Column: 9,
970
												Line:   31,
971
											},
972
											File:   "secrets_test.flux",
973
											Source: "input",
974
											Start: ast.Position{
975
												Column: 4,
976
												Line:   31,
977
978
979
											},
										},
									},
980
981
982
983
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
984
985
986
987
988
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 42,
989
													Line:   31,
990
												},
991
												File:   "secrets_test.flux",
992
993
994
												Source: "csv: inData",
												Start: ast.Position{
													Column: 31,
995
													Line:   31,
996
997
998
												},
											},
										},
999
										Properties: []*ast.Property{&ast.Property{
1000
1001
1002
1003
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
1004
														Column: 42,
1005
														Line:   31,
1006
													},
1007
													File:   "secrets_test.flux",
1008
													Source: "csv: inData",
1009
1010
													Start: ast.Position{
														Column: 31,
1011
														Line:   31,
1012
1013
1014
													},
												},
											},
1015
1016
1017
1018
1019
1020
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 34,
1021
															Line:   31,
1022
														},
1023
														File:   "secrets_test.flux",
1024
1025
1026
														Source: "csv",
														Start: ast.Position{
															Column: 31,
1027
															Line:   31,
1028
														},
1029
													},
1030
1031
1032
1033
1034
1035
1036
1037
1038
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 42,
1039
															Line:   31,
1040
														},
1041
														File:   "secrets_test.flux",
1042
1043
1044
														Source: "inData",
														Start: ast.Position{
															Column: 36,
1045
															Line:   31,
1046
														},
1047
1048
													},
												},
1049
												Name: "inData",
1050
											},
1051
1052
										}},
										With: nil,
1053
1054
1055
1056
1057
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
1058
												Column: 43,
1059
												Line:   31,
1060
											},
1061
											File:   "secrets_test.flux",
1062
											Source: "testing.loadStorage(csv: inData)",
1063
1064
											Start: ast.Position{
												Column: 11,
1065
												Line:   31,
1066
1067
1068
											},
										},
									},
1069
									Callee: &ast.MemberExpression{
1070
1071
1072
1073
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
1074
													Column: 30,
1075
													Line:   31,
1076
												},
1077
												File:   "secrets_test.flux",
1078
												Source: "testing.loadStorage",
1079
1080
												Start: ast.Position{
													Column: 11,
1081
													Line:   31,
1082
1083
1084
												},
											},
										},
1085
1086
1087
1088
1089
1090
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
1091
														Line:   31,
1092
													},
1093
													File:   "secrets_test.flux",
1094
1095
1096
													Source: "testing",
													Start: ast.Position{
														Column: 11,
1097
														Line:   31,
1098
													},
1099
												},
1100
1101
1102
1103
1104
1105
1106
1107
1108
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 30,
1109
														Line:   31,
1110
													},
1111
													File:   "secrets_test.flux",
1112
1113
1114
													Source: "loadStorage",
													Start: ast.Position{
														Column: 19,
1115
														Line:   31,
1116
													},
1117
1118
												},
											},
1119
											Name: "loadStorage",
1120
1121
1122
										},
									},
								},
1123
							}, &ast.Property{
1124
1125
1126
1127
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
1128
											Column: 80,
1129
											Line:   31,
1130
										},
1131
										File:   "secrets_test.flux",
1132
										Source: "want: testing.loadMem(csv: outData)",
1133
1134
										Start: ast.Position{
											Column: 45,
1135
											Line:   31,
1136
1137
1138
										},
									},
								},
1139
								Key: &ast.Identifier{
1140
1141
1142
1143
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
1144
												Column: 49,
1145
												Line:   31,
1146
											},
1147
											File:   "secrets_test.flux",
1148
											Source: "want",
1149
											Start: ast.Position{
1150
												Column: 45,
1151
												Line:   31,
1152
1153
1154
											},
										},
									},
1155
1156
1157
1158
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
1159
1160
1161
1162
1163
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 79,
1164
													Line:   31,
1165
												},
1166
												File:   "secrets_test.flux",
1167
1168
1169
												Source: "csv: outData",
												Start: ast.Position{
													Column: 67,
1170
													Line:   31,
1171
1172
1173
												},
											},
										},
1174
										Properties: []*ast.Property{&ast.Property{
1175
1176
1177
1178
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
1179
														Column: 79,
1180
														Line:   31,
1181
													},
1182
													File:   "secrets_test.flux",
1183
													Source: "csv: outData",
1184
1185
													Start: ast.Position{
														Column: 67,
1186
														Line:   31,
1187
1188
1189
													},
												},
											},
1190
1191
1192
1193
1194
1195
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 70,
1196
															Line:   31,
1197
														},
1198
														File:   "secrets_test.flux",
1199
1200
1201
														Source: "csv",
														Start: ast.Position{
															Column: 67,
1202
															Line:   31,
1203
														},
1204
													},
1205
1206
1207
1208
1209
1210
1211
1212
1213
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 79,
1214
															Line:   31,
1215
														},
1216
														File:   "secrets_test.flux",
1217
1218
1219
														Source: "outData",
														Start: ast.Position{
															Column: 72,
1220
															Line:   31,
1221
														},
1222
1223
													},
												},
1224
												Name: "outData",
1225
											},
1226
1227
										}},
										With: nil,
1228
1229
1230
1231
1232
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
1233
												Column: 80,
1234
												Line:   31,
1235
											},
1236
											File:   "secrets_test.flux",
1237
											Source: "testing.loadMem(csv: outData)",
1238
1239
											Start: ast.Position{
												Column: 51,
1240
												Line:   31,
1241
1242
1243
											},
										},
									},
1244
									Callee: &ast.MemberExpression{
1245
1246
1247
1248
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
Lorenzo Affetti's avatar