Skip to content

Commit

Permalink
gha: tests: temporarily disable some remote tests (iterative#6789)
Browse files Browse the repository at this point in the history
* gha: tests: temporarily disable some remote tests

See iterative#6788

* machine: upgrade tpi version

```
dvc/machine/backend/terraform.py:28:19: E1101: Instance of 'TerraformBackend' has no '_default_resource' member; maybe 'default_resource'? (no-member)
```

* tests: remotes: require --s3 for s3 tests
  • Loading branch information
efiop authored Oct 12, 2021
1 parent 6da1562 commit 53255c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: >-
python -m tests -n=4
--cov-report=xml --cov-report=term
--all ${{ env.extra_test_args }}
${{ env.extra_test_args }}
- name: upload coverage report
uses: codecov/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion dvc/machine/backend/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_executor(
def get_sshfs( # pylint: disable=unused-argument
self, name: Optional[str] = None, **config
) -> Iterator["SSHFileSystem"]:
resource = self._default_resource(name)
resource = self.default_resource(name)
with TerraformProviderIterative.pemfile(resource) as pem:
fs = SSHFileSystem(
host=resource["instance_ip"],
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ssh_gssapi = sshfs[gssapi]>=2021.8.1
webdav = webdav4>=0.9.1
# not to break `dvc[webhdfs]`
webhdfs =
terraform = tpi[ssh]>=0.0.0
terraform = tpi[ssh]>=2.0.0
tests =
%(terraform)s
wheel==0.37.0
Expand Down
6 changes: 3 additions & 3 deletions tests/remotes/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ def _check():


@pytest.fixture
def s3(s3_server, s3_fake_creds_file):
def s3(test_config, s3_server, s3_fake_creds_file):
test_config.requires("s3")
workspace = S3(S3.get_url())
workspace._s3.create_bucket(Bucket=TEST_AWS_REPO_BUCKET)
yield workspace


@pytest.fixture
def real_s3(test_config):
test_config.requires("s3")
def real_s3():
if not S3.should_test():
pytest.skip("no real s3")
yield S3(S3.get_url())

0 comments on commit 53255c2

Please sign in to comment.