Esempio n. 1
0
        public void GetVendors_GetKubernetesVendorInfo_None()
        {
            SetEnvironmentVariable(KubernetesServiceHost, null, EnvironmentVariableTarget.Process);

            var vendorInfo = new VendorInfo(_configuration, _agentHealthReporter, _environment, _vendorHttpApiRequestor);
            var model      = (KubernetesVendorModel)vendorInfo.GetKubernetesInfo();

            Assert.Null(model);
        }
Esempio n. 2
0
        public void GetVendors_GetKubernetesVendorInfo_Complete()
        {
            var serviceHost = "10.96.0.1";

            SetEnvironmentVariable(KubernetesServiceHost, serviceHost, EnvironmentVariableTarget.Process);

            var vendorInfo = new VendorInfo(_configuration, _agentHealthReporter, _environment, _vendorHttpApiRequestor);
            var model      = (KubernetesVendorModel)vendorInfo.GetKubernetesInfo();

            Assert.NotNull(model);
            Assert.True(model.KubernetesServiceHost == serviceHost);
        }