diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 530d40ec..d07c81c1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -71,9 +71,7 @@ jobs: make .install.bats make binary ./bin/prometheus-podman-exporter --collector.enable-all --collector.store_labels & - echo "starting e2e" make test-e2e - echo "stopping e2e" build_binary: runs-on: ubuntu-latest diff --git a/test/006-container.bats b/test/006-container.bats index af65c6bf..29e22893 100644 --- a/test/006-container.bats +++ b/test/006-container.bats @@ -74,14 +74,14 @@ load helpers exit fi - # podman container create --name $TEST_CNT_LABEL --label label01=value01 $TEST_BUSYBOX_IMAGE - # cnt_id=$(podman container inspect $TEST_CNT_LABEL -f "{{ .Id }}") - - # curl -s $METRICS_URL | grep "podman_container_info{id=\"${cnt_id:0:12}\",image=\"$TEST_BUSYBOX_IMAGE:latest\",label01=\"value01\",name=\"$TEST_CNT_LABEL\",pod_id=\"\",pod_name=\"\",ports=\"\"} 1" - # if [ $? -ne 0 ] ; then - # false - # exit - # fi + podman container create --name $TEST_CNT_LABEL --label label01=value01 $TEST_BUSYBOX_IMAGE + cnt_id=$(podman container inspect $TEST_CNT_LABEL -f "{{ .Id }}") + + curl -s $METRICS_URL | grep "podman_container_info{id=\"${cnt_id:0:12}\",image=\"$TEST_BUSYBOX_IMAGE:latest\",label01=\"value01\",name=\"$TEST_CNT_LABEL\",pod_id=\"\",pod_name=\"\",ports=\"\"} 1" + if [ $? -ne 0 ] ; then + false + exit + fi true }