Skip to content

Commit bd7fd94

Browse files
cosmo0920edsiper
authored andcommitted
tests: runtime: Use unique templete of tempfiles
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 1235949 commit bd7fd94

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/runtime/out_s3.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void flb_test_s3_multipart_success(void)
2222
int out_ffd;
2323
char *call_count_str;
2424
int call_count;
25-
char store_dir[] = "/tmp/flb-s3-test-XXXXXX";
25+
char store_dir[] = "/tmp/flb-s3-test-multipart-XXXXXX";
2626

2727
TEST_CHECK(mkdtemp(store_dir) != NULL);
2828

@@ -120,6 +120,7 @@ void flb_test_s3_putobject_error(void)
120120
int out_ffd;
121121
char *call_count_str;
122122
int call_count;
123+
char store_dir[] = "/tmp/flb-s3-test-putobj-XXXXXX";
123124

124125
/* mocks calls- signals that we are in test mode */
125126
setenv("FLB_S3_PLUGIN_UNDER_TEST", "true", 1);
@@ -139,6 +140,7 @@ void flb_test_s3_putobject_error(void)
139140
flb_output_set(ctx, out_ffd,"use_put_object", "true", NULL);
140141
flb_output_set(ctx, out_ffd,"total_file_size", "5M", NULL);
141142
flb_output_set(ctx, out_ffd,"upload_timeout", "6s", NULL);
143+
flb_output_set(ctx, out_ffd,"store_dir", store_dir, NULL);
142144
flb_output_set(ctx, out_ffd,"Retry_Limit", "1", NULL);
143145

144146
ret = flb_start(ctx);
@@ -228,7 +230,7 @@ void flb_test_s3_upload_part_error(void)
228230
int out_ffd;
229231
char *call_count_str;
230232
int call_count;
231-
char store_dir[] = "/tmp/flb-s3-test-XXXXXX";
233+
char store_dir[] = "/tmp/flb-s3-test-part-err-XXXXXX";
232234

233235
TEST_CHECK(mkdtemp(store_dir) != NULL);
234236

@@ -286,7 +288,7 @@ void flb_test_s3_complete_upload_error(void)
286288
int out_ffd;
287289
char *call_count_str;
288290
int call_count;
289-
char store_dir[] = "/tmp/flb-s3-test-XXXXXX";
291+
char store_dir[] = "/tmp/flb-s3-test-uplaod-err-XXXXXX";
290292

291293
TEST_CHECK(mkdtemp(store_dir) != NULL);
292294

@@ -625,7 +627,7 @@ void flb_test_s3_preserve_data_ordering(void)
625627
int out_ffd;
626628
char *call_count_str;
627629
int call_count;
628-
char store_dir[] = "/tmp/flb-s3-test-XXXXXX";
630+
char store_dir[] = "/tmp/flb-s3-test-ordering-XXXXXX";
629631

630632
TEST_CHECK(mkdtemp(store_dir) != NULL);
631633

0 commit comments

Comments
 (0)