diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f99c2efe..7d842f31 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -72,7 +72,7 @@ jobs: - name: Install dependencies run: make setup - name: Login to ghcr.io - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2.2.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -109,7 +109,7 @@ jobs: - name: Install dependencies run: make setup - name: Login to ghcr.io - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2.2.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/tests/unit/test_metrics.py b/tests/unit/test_metrics.py index fe0a6953..f636f1f6 100644 --- a/tests/unit/test_metrics.py +++ b/tests/unit/test_metrics.py @@ -652,9 +652,12 @@ async def test_get_latest_value_unknown_instance_type( self, collector_factory: Callable[..., AbstractContextManager[GCPNodePriceCollector]], ) -> None: - with collector_factory("n1-highmem-8", "unknown", True) as collector: - with pytest.raises(AssertionError, match=r"Found prices only for: \[\]"): - await collector.get_latest_value() + with collector_factory( + "n1-highmem-8", "unknown", True + ) as collector, pytest.raises( + AssertionError, match=r"Found prices only for: \[\]" + ): + await collector.get_latest_value() async def test_get_latest_value_unknown_gpu( self, @@ -662,11 +665,10 @@ async def test_get_latest_value_unknown_gpu( ) -> None: with collector_factory( "n1-highmem-8-1xv100", "n1-highmem-8", True - ) as collector: - with pytest.raises( - AssertionError, match=r"Found prices only for: \[CPU, RAM\]" - ): - await collector.get_latest_value() + ) as collector, pytest.raises( + AssertionError, match=r"Found prices only for: \[CPU, RAM\]" + ): + await collector.get_latest_value() class TestAzureNodePriceCollector: