23 references to SetEnvironmentVariable
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes.Tests (23)
KubernetesMetadataTests.cs (11)
106
tempSetup.
SetEnvironmentVariable
("LIMITS_MEMORY", envValue);
107
tempSetup.
SetEnvironmentVariable
("LIMITS_CPU", envValue);
108
tempSetup.
SetEnvironmentVariable
("REQUESTS_MEMORY", envValue);
109
tempSetup.
SetEnvironmentVariable
("REQUESTS_CPU", envValue);
136
tempSetup.
SetEnvironmentVariable
(varSuffix, invalidValue);
157
tempSetup.
SetEnvironmentVariable
("LIMITS_MEMORY", "2147483648"); // 2GB
158
tempSetup.
SetEnvironmentVariable
("LIMITS_CPU", "2000"); // 2 cores
187
tempSetup.
SetEnvironmentVariable
($"{Prefix1}LIMITS_MEMORY", "1073741824"); // 1GB
188
tempSetup.
SetEnvironmentVariable
($"{Prefix1}LIMITS_CPU", "1000"); // 1 core
189
tempSetup.
SetEnvironmentVariable
($"{Prefix2}LIMITS_MEMORY", "2147483648"); // 2GB
190
tempSetup.
SetEnvironmentVariable
($"{Prefix2}LIMITS_CPU", "2000"); // 2 cores
KubernetesResourceQuotasServiceCollectionExtensionsTests.cs (2)
137
environmentSetup.
SetEnvironmentVariable
("TEST_REQUESTS_MEMORY", "1000");
138
environmentSetup.
SetEnvironmentVariable
("TEST_REQUESTS_CPU", "1000");
TestKubernetesEnvironmentSetup.cs (10)
32
SetEnvironmentVariable
($"{prefix}LIMITS_MEMORY", limitsMemory.ToString());
33
SetEnvironmentVariable
($"{prefix}LIMITS_CPU", limitsCpu.ToString());
34
SetEnvironmentVariable
($"{prefix}REQUESTS_MEMORY", requestsMemory.ToString());
35
SetEnvironmentVariable
($"{prefix}REQUESTS_CPU", requestsCpu.ToString());
46
SetEnvironmentVariable
($"{prefix}LIMITS_MEMORY", "1073741824"); // 1GB
47
SetEnvironmentVariable
($"{prefix}LIMITS_CPU", "1000"); // 1 core
59
SetEnvironmentVariable
($"{prefix}LIMITS_MEMORY", ulong.MaxValue.ToString());
60
SetEnvironmentVariable
($"{prefix}LIMITS_CPU", ulong.MaxValue.ToString());
61
SetEnvironmentVariable
($"{prefix}REQUESTS_MEMORY", "0");
62
SetEnvironmentVariable
($"{prefix}REQUESTS_CPU", "0");