blob: bd3357822940e517ef173d9818ae216170ecb6e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef AWS_CREDENTIALS_TEST_INTERNAL_H
#define AWS_CREDENTIALS_TEST_INTERNAL_H
#include "flb_tests_internal.h"
#define AWS_TEST_DATA_PATH(FILE_PATH) FLB_TESTS_DATA_PATH "data/aws_credentials/" FILE_PATH
static int unset_profile_env()
{
int ret;
ret = unsetenv("HOME");
if (ret < 0) {
flb_errno();
return -1;
}
ret = unsetenv("AWS_CONFIG_FILE");
if (ret < 0) {
flb_errno();
return -1;
}
ret = unsetenv("AWS_SHARED_CREDENTIALS_FILE");
if (ret < 0) {
flb_errno();
return -1;
}
ret = unsetenv("AWS_DEFAULT_PROFILE");
if (ret < 0) {
flb_errno();
return -1;
}
ret = unsetenv("AWS_PROFILE");
if (ret < 0) {
flb_errno();
return -1;
}
return 0;
}
#endif /* AWS_CREDENTIALS_TEST_INTERNAL_H */
|