Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
WakeupTsai committed Jul 24, 2018
1 parent f6e33b8 commit f8f546d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ apps.init-helm:
.PHONY: apps.launch-apps
apps.launch-apps:
helm install --name foundation --debug --wait --set global.environment=local deploy/helm/foundation
helm install --name prometheus --debug --wait --set global.environment=local deploy/helm/apps/charts/prometheus
# helm install --name prometheus --debug --wait --set global.environment=local deploy/helm/apps/charts/prometheus
kubectl apply -f deploy/kubernetes/apps/monitoring -R
helm install --name vortex-server --debug --wait --set global.environment=local deploy/helm/apps/charts/vortex-server

.PHONY: apps.teardown
Expand Down
12 changes: 6 additions & 6 deletions src/prometheuscontroller/expression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ func (suite *PrometheusExpressionTestSuite) TestGetPod() {
}

func (suite *PrometheusExpressionTestSuite) TestGetContainer() {
// namespace := "vortex"
// pods, err := suite.sp.KubeCtl.GetPods(namespace)
// suite.NoError(err)
// containerName := pods[0].Status.ContainerStatuses[0].Name
namespace := "vortex"
pods, err := suite.sp.KubeCtl.GetPods(namespace)
suite.NoError(err)
containerName := pods[0].Status.ContainerStatuses[0].Name

container, err := GetContainer(suite.sp, "cadvisor")
container, err := GetContainer(suite.sp, containerName)
suite.NoError(err)
suite.Equal("cadvisor", container.Detail.ContainerName)
suite.Equal(containerName, container.Detail.ContainerName)
}

func (suite *PrometheusExpressionTestSuite) TestGetService() {
Expand Down

0 comments on commit f8f546d

Please sign in to comment.