diff --git a/airbyte_cdk/test/models/scenario.py b/airbyte_cdk/test/models/scenario.py index 2704f6e96..ddd99ef74 100644 --- a/airbyte_cdk/test/models/scenario.py +++ b/airbyte_cdk/test/models/scenario.py @@ -143,9 +143,10 @@ def with_temp_config_file( ) as temp_file: temp_file.write(json.dumps(config)) temp_file.flush() - # Allow the file to be read by other processes + # Allow the file to be read and written by other processes + # Write access is needed for connectors with config migration (e.g., OAuth token refresh) temp_path = Path(temp_file.name) - temp_path.chmod(temp_path.stat().st_mode | 0o444) + temp_path.chmod(temp_path.stat().st_mode | 0o666) yield temp_path # attempt cleanup, ignore errors diff --git a/airbyte_cdk/test/standard_tests/docker_base.py b/airbyte_cdk/test/standard_tests/docker_base.py index bc26802dd..e3e196ce1 100644 --- a/airbyte_cdk/test/standard_tests/docker_base.py +++ b/airbyte_cdk/test/standard_tests/docker_base.py @@ -243,7 +243,7 @@ def test_docker_image_build_and_check( "run", "--rm", "-v", - f"{temp_config_file}:{container_config_path}", + f"{temp_config_file}:{container_config_path}:rw", connector_image, "check", "--config", @@ -336,7 +336,7 @@ def test_docker_image_build_and_read( "run", "--rm", "-v", - f"{temp_config_file}:{container_config_path}", + f"{temp_config_file}:{container_config_path}:rw", connector_image, "discover", "--config", @@ -393,7 +393,7 @@ def test_docker_image_build_and_read( "run", "--rm", "-v", - f"{temp_config_file}:{container_config_path}", + f"{temp_config_file}:{container_config_path}:rw", "-v", f"{configured_catalog_path}:{container_catalog_path}", connector_image,